PluginProbe
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder / 51.1.86
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder v51.1.86
51.1.86 51.1.84 51.1.85 51.1.83 51.1.82 51.1.81 51.1.79 51.1.78 51.1.77 51.1.76 51.1.74 51.1.75 51.1.65 51.1.64 51.1.63 trunk 51.1.14 51.1.2 51.1.35 51.1.36 51.1.37 51.1.38 51.1.39 51.1.44 51.1.45 All 40 releases
← All changes | includes/features/Rotating_Animation/preview-handler.js +42 -0 51.1.2 → 51.1.86 View file →
@@ -1,0 +1,42 @@
1 +"use strict";
2 +(function ($) {
3 + $(window).on('elementor/frontend/init', function () {
4 + let KngRotatingAnimationHandler = elementorModules.frontend.handlers.Base.extend({
5 + onInit: function onInit() {
6 + if (this.$element.hasClass('kng-rotating-animation-yes')) {
7 + this.applyKngRotatingAnimation();
8 + }
9 + },
10 + getReadySettings: function getReadySettings() {
11 + let settings = {
12 + animation_duration: this.getElementSettings('kng_rotating_animation_duration'),
13 + animation_delay: this.getElementSettings('kng_rotating_animation_delay')
14 + };
15 + return $.extend({}, settings);
16 + },
17 + onElementChange: function onElementChange() {
18 + if (this.$element.hasClass('kng-rotating-animation-yes')) {
19 + if (!this.$element.hasClass('kng-style-rotating-animation-applied')) {
20 + this.applyKngRotatingAnimation();
21 + }
22 + }
23 + },
24 + applyKngRotatingAnimation: function applyKngRotatingAnimation() {
25 + let options = this.getReadySettings();
26 + let element_ID = this.$element.data('id');
27 + $('.kng-style-rotating-animation-' + element_ID).remove();
28 + this.$element.addClass('kng-style-rotating-animation-applied');
29 + this.$element.before('<style>@keyframes rotating-animation-' + element_ID + ' {0% {transform: rotate(0deg);} 100% {transform: rotate(360deg)}}' +
30 + '.elementor-element-' + element_ID + '.kng-rotating-animation-yes {animation: rotating-animation-' + element_ID + ' ' + options.animation_duration + 'ms linear infinite; animation-delay: ' + options.animation_delay + 'ms;' +
31 + '</style>');
32 + }
33 + });
34 +
35 + elementorFrontend.hooks.addAction('frontend/element_ready/global', function ($scope) {
36 + elementorFrontend.elementsHandler.addHandler(KngRotatingAnimationHandler, {
37 + $element: $scope
38 + });
39 + });
40 +
41 + });
42 +})(jQuery);