Changeset 2710554
- Timestamp:
- 04/16/2022 03:20:09 PM (4 years ago)
- Location:
- scroll-magic-addon-for-elementor
- Files:
-
- 124 added
- 7 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/assets (added)
-
tags/1.0.1/assets/admin (added)
-
tags/1.0.1/assets/lib (added)
-
tags/1.0.1/assets/lib/animate (added)
-
tags/1.0.1/assets/lib/animate/animate.min.css (added)
-
tags/1.0.1/assets/lib/animate/magic.min.css (added)
-
tags/1.0.1/assets/lib/gsap (added)
-
tags/1.0.1/assets/lib/gsap/CSSRulePlugin.min.js (added)
-
tags/1.0.1/assets/lib/gsap/CSSRulePlugin.min.js.map (added)
-
tags/1.0.1/assets/lib/gsap/Draggable.min.js (added)
-
tags/1.0.1/assets/lib/gsap/Draggable.min.js.map (added)
-
tags/1.0.1/assets/lib/gsap/DrawSVG.min.js (added)
-
tags/1.0.1/assets/lib/gsap/EasePack.min.js (added)
-
tags/1.0.1/assets/lib/gsap/EasePack.min.js.map (added)
-
tags/1.0.1/assets/lib/gsap/EaselPlugin.min.js (added)
-
tags/1.0.1/assets/lib/gsap/EaselPlugin.min.js.map (added)
-
tags/1.0.1/assets/lib/gsap/MotionPathPlugin.min.js (added)
-
tags/1.0.1/assets/lib/gsap/MotionPathPlugin.min.js.map (added)
-
tags/1.0.1/assets/lib/gsap/PixiPlugin.min.js (added)
-
tags/1.0.1/assets/lib/gsap/PixiPlugin.min.js.map (added)
-
tags/1.0.1/assets/lib/gsap/ScrollToPlugin.min.js (added)
-
tags/1.0.1/assets/lib/gsap/ScrollToPlugin.min.js.map (added)
-
tags/1.0.1/assets/lib/gsap/SplitText3.min.js (added)
-
tags/1.0.1/assets/lib/gsap/TextPlugin.min.js (added)
-
tags/1.0.1/assets/lib/gsap/TextPlugin.min.js.map (added)
-
tags/1.0.1/assets/lib/gsap/gsap.min.js (added)
-
tags/1.0.1/assets/lib/gsap/gsap.min.js.map (added)
-
tags/1.0.1/assets/lib/scrollmagic (added)
-
tags/1.0.1/assets/lib/scrollmagic/minified (added)
-
tags/1.0.1/assets/lib/scrollmagic/minified/ScrollMagic.min.js (added)
-
tags/1.0.1/assets/lib/scrollmagic/minified/plugins (added)
-
tags/1.0.1/assets/lib/scrollmagic/minified/plugins/animation.gsap.min.js (added)
-
tags/1.0.1/assets/lib/scrollmagic/minified/plugins/animation.velocity.min.js (added)
-
tags/1.0.1/assets/lib/scrollmagic/minified/plugins/debug.addIndicators.min.js (added)
-
tags/1.0.1/assets/lib/scrollmagic/minified/plugins/jquery.ScrollMagic.min.js (added)
-
tags/1.0.1/assets/public (added)
-
tags/1.0.1/assets/public/css (added)
-
tags/1.0.1/assets/public/css/wpmp.css (added)
-
tags/1.0.1/assets/public/css/wpmp.css.map (added)
-
tags/1.0.1/assets/public/css/wpmp.scss (added)
-
tags/1.0.1/assets/public/imgs (added)
-
tags/1.0.1/assets/public/imgs/placeholder.png (added)
-
tags/1.0.1/assets/public/js (added)
-
tags/1.0.1/assets/public/js/edittor-shupport.js (added)
-
tags/1.0.1/assets/public/js/wpmp.js (added)
-
tags/1.0.1/assets/public/sass (added)
-
tags/1.0.1/assets/public/sass/imgSequence.scss (added)
-
tags/1.0.1/assets/public/sass/svgdraw.scss (added)
-
tags/1.0.1/includes (added)
-
tags/1.0.1/includes/elementor (added)
-
tags/1.0.1/includes/elementor/add_content.class.php (added)
-
tags/1.0.1/includes/elementor/add_section.class.php (added)
-
tags/1.0.1/includes/elementor/category.class.php (added)
-
tags/1.0.1/includes/elementor/css.class.php (added)
-
tags/1.0.1/includes/elementor/widget (added)
-
tags/1.0.1/includes/elementor/widget/drawsvg.widget.php (added)
-
tags/1.0.1/includes/elementor/widget/imageSequence.widget.php (added)
-
tags/1.0.1/includes/elementor/widget/splitText3.widget.php (added)
-
tags/1.0.1/includes/index.php (added)
-
tags/1.0.1/index.php (added)
-
tags/1.1.0 (added)
-
tags/1.1.0/assets (added)
-
tags/1.1.0/assets/admin (added)
-
tags/1.1.0/assets/lib (added)
-
tags/1.1.0/assets/lib/animate (added)
-
tags/1.1.0/assets/lib/animate/animate.min.css (added)
-
tags/1.1.0/assets/lib/animate/magic.min.css (added)
-
tags/1.1.0/assets/lib/gsap (added)
-
tags/1.1.0/assets/lib/gsap/CSSRulePlugin.min.js (added)
-
tags/1.1.0/assets/lib/gsap/CSSRulePlugin.min.js.map (added)
-
tags/1.1.0/assets/lib/gsap/Draggable.min.js (added)
-
tags/1.1.0/assets/lib/gsap/Draggable.min.js.map (added)
-
tags/1.1.0/assets/lib/gsap/DrawSVG.min.js (added)
-
tags/1.1.0/assets/lib/gsap/EasePack.min.js (added)
-
tags/1.1.0/assets/lib/gsap/EasePack.min.js.map (added)
-
tags/1.1.0/assets/lib/gsap/EaselPlugin.min.js (added)
-
tags/1.1.0/assets/lib/gsap/EaselPlugin.min.js.map (added)
-
tags/1.1.0/assets/lib/gsap/MotionPathPlugin.min.js (added)
-
tags/1.1.0/assets/lib/gsap/MotionPathPlugin.min.js.map (added)
-
tags/1.1.0/assets/lib/gsap/PixiPlugin.min.js (added)
-
tags/1.1.0/assets/lib/gsap/PixiPlugin.min.js.map (added)
-
tags/1.1.0/assets/lib/gsap/ScrollToPlugin.min.js (added)
-
tags/1.1.0/assets/lib/gsap/ScrollToPlugin.min.js.map (added)
-
tags/1.1.0/assets/lib/gsap/SplitText3.min.js (added)
-
tags/1.1.0/assets/lib/gsap/TextPlugin.min.js (added)
-
tags/1.1.0/assets/lib/gsap/TextPlugin.min.js.map (added)
-
tags/1.1.0/assets/lib/gsap/gsap.min.js (added)
-
tags/1.1.0/assets/lib/gsap/gsap.min.js.map (added)
-
tags/1.1.0/assets/lib/scrollmagic (added)
-
tags/1.1.0/assets/lib/scrollmagic/minified (added)
-
tags/1.1.0/assets/lib/scrollmagic/minified/ScrollMagic.min.js (added)
-
tags/1.1.0/assets/lib/scrollmagic/minified/plugins (added)
-
tags/1.1.0/assets/lib/scrollmagic/minified/plugins/animation.gsap.min.js (added)
-
tags/1.1.0/assets/lib/scrollmagic/minified/plugins/animation.velocity.min.js (added)
-
tags/1.1.0/assets/lib/scrollmagic/minified/plugins/debug.addIndicators.min.js (added)
-
tags/1.1.0/assets/lib/scrollmagic/minified/plugins/jquery.ScrollMagic.min.js (added)
-
tags/1.1.0/assets/public (added)
-
tags/1.1.0/assets/public/css (added)
-
tags/1.1.0/assets/public/css/wpmp.css (added)
-
tags/1.1.0/assets/public/css/wpmp.css.map (added)
-
tags/1.1.0/assets/public/css/wpmp.scss (added)
-
tags/1.1.0/assets/public/imgs (added)
-
tags/1.1.0/assets/public/imgs/placeholder.png (added)
-
tags/1.1.0/assets/public/js (added)
-
tags/1.1.0/assets/public/js/edittor-shupport.js (added)
-
tags/1.1.0/assets/public/js/wpmp.js (added)
-
tags/1.1.0/assets/public/sass (added)
-
tags/1.1.0/assets/public/sass/imgSequence.scss (added)
-
tags/1.1.0/assets/public/sass/svgdraw.scss (added)
-
tags/1.1.0/includes (added)
-
tags/1.1.0/includes/elementor (added)
-
tags/1.1.0/includes/elementor/add_content.class.php (added)
-
tags/1.1.0/includes/elementor/add_section.class.php (added)
-
tags/1.1.0/includes/elementor/category.class.php (added)
-
tags/1.1.0/includes/elementor/css.class.php (added)
-
tags/1.1.0/includes/elementor/test.php (added)
-
tags/1.1.0/includes/elementor/widget (added)
-
tags/1.1.0/includes/elementor/widget/drawsvg.widget.php (added)
-
tags/1.1.0/includes/elementor/widget/imageSequence.widget.php (added)
-
tags/1.1.0/includes/elementor/widget/splitText3.widget.php (added)
-
tags/1.1.0/includes/index.php (added)
-
tags/1.1.0/index.php (added)
-
trunk/assets/public/js/edittor-shupport.js (modified) (1 diff)
-
trunk/assets/public/js/wpmp.js (modified) (5 diffs)
-
trunk/includes/elementor/add_content.class.php (modified) (1 diff)
-
trunk/includes/elementor/add_section.class.php (modified) (62 diffs)
-
trunk/includes/elementor/css.class.php (modified) (1 diff)
-
trunk/includes/elementor/test.php (added)
-
trunk/index.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
scroll-magic-addon-for-elementor/trunk/assets/public/js/edittor-shupport.js
r2288386 r2710554 1 "use strict"; 2 1 3 (function ($) { 2 "use strict";3 4 4 function addCustomCss(css, view) { 5 console.log(css); 6 var model = view.getEditModel(), 5 function addCustomCss(css, view) { 6 const model = view.getEditModel(), 7 7 customCSS = model.get('settings').get('custom_css'), 8 attributes = model.get('settings').attributes ;9 vardefault_css = '{',8 attributes = model.get('settings').attributes; 9 let default_css = '{', 10 10 transform_css = 'transform:', 11 group1 = ['width', 'height',],12 group2 = ['background-color', 'color','opacity','display','transform-origin'],13 group3 = ['rotateX', 'rotateY','rotateZ','skewY','skewX'],14 group4 = ['translateX', 'translateY','translateZ'];15 Object.keys(attributes).forEach(function (item) {16 if( item==null && item !==0 ){17 }else{18 if( item.indexOf("wpmp-def_") > -1 ){19 var nameCSS = item.replace(/wpmp-def_/, '');20 if( group1.indexOf(nameCSS )> -1 ){11 group1 = ['width', 'height',], 12 group2 = ['background-color', 'color', 'opacity', 'display', 'transform-origin'], 13 group3 = ['rotateX', 'rotateY', 'rotateZ', 'skewY', 'skewX'], 14 group4 = ['translateX', 'translateY', 'translateZ']; 15 Object.keys(attributes).forEach(function (item) { 16 if (item == null && item !== 0) { 17 } else { 18 if (item.indexOf("wpmp-def_") > -1) { 19 var nameCSS = item.replace(/wpmp-def_/, ''); 20 if (group1.indexOf(nameCSS) > -1) { 21 21 22 default_css += nameCSS+':'+attributes[item] + 'px;';22 default_css += nameCSS + ':' + attributes[item] + 'px;'; 23 23 24 }else if( group2.indexOf(nameCSS )> -1 ){24 } else if (group2.indexOf(nameCSS) > -1) { 25 25 26 default_css += nameCSS+':'+attributes[item]+';';26 default_css += nameCSS + ':' + attributes[item] + ';'; 27 27 28 }else if( group3.indexOf(nameCSS ) > -1){28 } else if (group3.indexOf(nameCSS) > -1) { 29 29 30 transform_css += nameCSS+'('+attributes[item]+'deg)';30 transform_css += nameCSS + '(' + attributes[item] + 'deg)'; 31 31 32 }else if( group4.indexOf(nameCSS) > -1 ){32 } else if (group4.indexOf(nameCSS) > -1) { 33 33 34 transform_css += nameCSS+'('+attributes[item]+'px)';34 transform_css += nameCSS + '(' + attributes[item] + 'px)'; 35 35 36 }else{36 } else { 37 37 38 transform_css += nameCSS+'('+attributes[item]+')';38 transform_css += nameCSS + '(' + attributes[item] + ')'; 39 39 40 }41 40 } 42 41 } 43 44 });45 if(transform_css != 'transform:'){46 default_css += transform_css +";";47 }48 49 if( default_css == '{'){50 return;51 }else{52 default_css += '}';53 default_css = '.elementor-element.elementor-element-' + view.model.id+' .elementor-widget-container *:not(.scrollMagicControl)'+default_css;54 42 } 55 43 56 return default_css; 57 } 44 }); 45 if (transform_css !== 'transform:') { 46 default_css += transform_css + ";"; 47 } 58 48 59 function addPageCustomCss() { 60 var customCSS = elementor.settings.page.model.get('custom_css'); 61 if (customCSS) { 62 customCSS = customCSS.replace(/selector/g, elementor.config.settings.page.cssWrapperSelector); 63 elementor.settings.page.getControlsCSS().elements.$stylesheetElement.append(customCSS); 64 } 65 } 66 67 elementor.hooks.addFilter('editor/style/styleText', addCustomCss); 49 if (default_css === '{') { 50 return; 51 } else { 52 default_css += '}'; 53 default_css = '.elementor-element.elementor-element-' + view.model.id + ' .elementor-widget-container *:not(.scrollMagicControl)' + default_css; 54 } 55 56 return default_css; 57 } 58 59 function addPageCustomCss() { 60 let customCSS = elementor.settings.page.model.get('custom_css'); 61 if (customCSS) { 62 customCSS = customCSS.replace(/selector/g, elementor.config.settings.page.cssWrapperSelector); 63 elementor.settings.page.getControlsCSS().elements.$stylesheetElement.append(customCSS); 64 } 65 } 66 67 // elementor.hooks.addFilter('editor/style/styleText', addCustomCss); 68 69 70 function addEffect(panel, model) { 71 72 } 73 elementor.hooks.addFilter('editor/style/styleText', addCustomCss); 68 74 })(jQuery); -
scroll-magic-addon-for-elementor/trunk/assets/public/js/wpmp.js
r2288386 r2710554 2 2 3 3 (function($) { 4 4 5 5 $( document ).ready(function(){ 6 6 var deviceW = 'desktop'; … … 20 20 21 21 const seftID = $(seft).attr('id'); 22 var effect = JSON.parse( 22 var effect = JSON.parse( 23 23 $(seft).attr('effect') 24 24 .replace( /,}/g, "}") … … 73 73 } 74 74 scene.addTo(controller); 75 75 76 76 // SVG 77 77 if( $(seft).next().hasClass('drawsvg') || $(seft).next().find('.drawsvg').length >0){ … … 108 108 { 109 109 curImg: images.length - 1, 110 roundProps: "curImg", 111 repeat: repeat, 112 immediateRender: true, 113 ease: Linear.easeNone, 110 roundProps: "curImg", 111 repeat: repeat, 112 immediateRender: true, 113 ease: Linear.easeNone, 114 114 onUpdate: function () { 115 115 $(seft).next().find('.wpmp_image_sequence').attr("src", images[obj.curImg]); … … 131 131 // splitText 132 132 if( $(seft).next().hasClass('splitText') || $(seft).next().find('.splitText').length >0){ 133 var splitTextEffect = JSON.parse( 133 var splitTextEffect = JSON.parse( 134 134 $(seft) 135 135 .attr('split-text') -
scroll-magic-addon-for-elementor/trunk/includes/elementor/add_content.class.php
r2297466 r2710554 59 59 } 60 60 61 62 61 } 63 62 -
scroll-magic-addon-for-elementor/trunk/includes/elementor/add_section.class.php
r2297466 r2710554 1 1 <?php 2 3 use Elementor\Controls_Manager; 4 use Elementor\Repeater; 5 2 6 if ( ! defined( 'WPINC' ) ) { 3 7 die; … … 5 9 6 10 if ( ! class_exists( 'Wpmp_add_section' ) ) { 7 8 11 12 9 13 class Wpmp_add_section{ 10 14 11 15 public function __construct(){ 12 16 add_action( 'elementor/element/before_section_start', [$this,'add_scroll_magic_control'], 10, 3 ); 13 14 17 add_action( 'elementor/element/after_section_end', [$this,'add_scroll_magic_default'], 10, 3 ); 15 16 18 add_action( 'elementor/element/after_section_end', [$this,'add_scroll_magic_effect'], 10, 3 ); 17 19 } 18 20 19 21 function add_scroll_magic_control( $element, $section_id, $args ) { 20 /** @var \Elementor\Element_Base $element */21 22 $except = ['column','section']; 22 23 if(in_array($element->get_name(),$except )) return; … … 25 26 'section_scrollmagic_control', 26 27 [ 27 'tab' => \Elementor\Controls_Manager::TAB_STYLE,28 'tab' => Controls_Manager::TAB_STYLE, 28 29 'label' => __( 'Scroll Magic control', 'wpmp' ), 29 30 ] … … 33 34 [ 34 35 'label' => __( 'Hide On Desktop', 'wpmp' ), 35 'type' => \Elementor\Controls_Manager::SWITCHER,36 'type' => Controls_Manager::SWITCHER, 36 37 'label_on' => __( 'Hide', 'wpmp' ), 37 38 'label_off' => __( 'Show', 'wpmp' ), … … 44 45 [ 45 46 'label' => __( 'Hide On Tablet', 'wpmp' ), 46 'type' => \Elementor\Controls_Manager::SWITCHER,47 'type' => Controls_Manager::SWITCHER, 47 48 'label_on' => __( 'Hide', 'wpmp' ), 48 49 'label_off' => __( 'Show', 'wpmp' ), … … 55 56 [ 56 57 'label' => __( 'Hide On Mobile', 'wpmp' ), 57 'type' => \Elementor\Controls_Manager::SWITCHER,58 'type' => Controls_Manager::SWITCHER, 58 59 'label_on' => __( 'Hide', 'wpmp' ), 59 60 'label_off' => __( 'Show', 'wpmp' ), … … 65 66 'wpmp_trigger_hook', 66 67 [ 67 'type' => \Elementor\Controls_Manager::NUMBER,68 'type' => Controls_Manager::NUMBER, 68 69 'label' => __( 'Trigger Hook', 'wpmp' ), 69 70 'min' => '0','max' => '1','step' => '0.1', … … 75 76 [ 76 77 'label' => __( 'Reverse', 'wpmp' ), 77 'type' => \Elementor\Controls_Manager::SWITCHER,78 'type' => Controls_Manager::SWITCHER, 78 79 'label_on' => __( 'On', 'wpmp' ), 79 80 'label_off' => __( 'Off', 'wpmp' ), … … 86 87 [ 87 88 'label' => __( 'Pin', 'wpmp' ), 88 'type' => \Elementor\Controls_Manager::SWITCHER,89 'type' => Controls_Manager::SWITCHER, 89 90 'label_on' => __( 'On', 'wpmp' ), 90 91 'label_off' => __( 'Off', 'wpmp' ), … … 97 98 [ 98 99 'label' => __( 'pushFollowers', 'wpmp' ), 99 'type' => \Elementor\Controls_Manager::SWITCHER,100 'type' => Controls_Manager::SWITCHER, 100 101 'label_on' => __( 'On', 'wpmp' ), 101 102 'label_off' => __( 'Off', 'wpmp' ), … … 108 109 [ 109 110 'label' => __( 'TweenChanges', 'wpmp' ), 110 'type' => \Elementor\Controls_Manager::SWITCHER,111 'type' => Controls_Manager::SWITCHER, 111 112 'label_on' => __( 'On', 'wpmp' ), 112 113 'label_off' => __( 'Off', 'wpmp' ), … … 118 119 'wpmp_duration', 119 120 [ 120 'type' => \Elementor\Controls_Manager::NUMBER,121 'type' => Controls_Manager::NUMBER, 121 122 'label' => __( 'Duration', 'wpmp' ), 122 123 'step' => '1', … … 127 128 'wpmp_offset', 128 129 [ 129 'type' => \Elementor\Controls_Manager::NUMBER,130 'type' => Controls_Manager::NUMBER, 130 131 'label' => __( 'Offset', 'wpmp' ), 131 132 'step' => '1', … … 137 138 [ 138 139 'label' => __( 'Enable Class toggle', 'wpmp' ), 139 'type' => \Elementor\Controls_Manager::SWITCHER,140 'type' => Controls_Manager::SWITCHER, 140 141 'label_on' => __( 'On', 'wpmp' ), 141 142 'label_off' => __( 'Off', 'wpmp' ), … … 148 149 [ 149 150 'label' => __( 'Class CSS', 'wpmp' ), 150 'type' => \Elementor\Controls_Manager::SELECT,151 'type' => Controls_Manager::SELECT, 151 152 'default' => 'custom', 152 153 'options' => [ … … 297 298 [ 298 299 'label' => __( 'Custom Class', 'wpmp' ), 299 'type' => \Elementor\Controls_Manager::TEXT,300 'type' => Controls_Manager::TEXT, 300 301 'default' => __( '', 'wpmp' ), 301 302 'placeholder' => __( 'Enter your class css', 'wpmp' ), … … 307 308 [ 308 309 'label' => __( 'Enable Debug', 'wpmp' ), 309 'type' => \Elementor\Controls_Manager::SWITCHER,310 'type' => Controls_Manager::SWITCHER, 310 311 'label_on' => __( 'On', 'wpmp' ), 311 312 'label_off' => __( 'Off', 'wpmp' ), … … 320 321 321 322 function add_scroll_magic_default( $element, $section_id, $args ) { 322 /** @var \Elementor\Element_Base $element */323 323 if ( 'section_scrollmagic_control' === $section_id ) { 324 324 $element->start_controls_section( 325 325 'section_scrollmagic_default', 326 326 [ 327 'tab' => \Elementor\Controls_Manager::TAB_STYLE,327 'tab' => Controls_Manager::TAB_STYLE, 328 328 'label' => __( 'Scroll Magic default', 'wpmp' ), 329 329 ] … … 333 333 [ 334 334 'label' => __( 'Wight', 'wpmp' ), 335 'type' => \Elementor\Controls_Manager::NUMBER,335 'type' => Controls_Manager::NUMBER, 336 336 'step' => 1, 337 337 'default' => "", … … 342 342 [ 343 343 'label' => __( 'Height', 'wpmp' ), 344 'type' => \Elementor\Controls_Manager::NUMBER,344 'type' => Controls_Manager::NUMBER, 345 345 'step' => 1, 346 346 'default' => "", … … 351 351 [ 352 352 'label' => __( 'Opacity', 'wpmp' ), 353 'type' => \Elementor\Controls_Manager::NUMBER,353 'type' => Controls_Manager::NUMBER, 354 354 'step' => 0.1,'min' => 0,'max' => 1, 355 355 'default' => "", … … 360 360 [ 361 361 'label' => __( 'Color', 'wpmp' ), 362 'type' => \Elementor\Controls_Manager::COLOR, 363 'scheme' => [ 364 'type' => \Elementor\Scheme_Color::get_type(), 365 'value' => \Elementor\Scheme_Color::COLOR_1, 366 ], 362 'type' => Controls_Manager::COLOR, 367 363 'selectors' => [ 368 364 '{{WRAPPER}} .title' => 'color: {{VALUE}}', … … 374 370 [ 375 371 'label' => __( 'Background Color', 'wpmp' ), 376 'type' => \Elementor\Controls_Manager::COLOR, 377 'scheme' => [ 378 'type' => \Elementor\Scheme_Color::get_type(), 379 'value' => \Elementor\Scheme_Color::COLOR_1, 380 ], 372 'type' => Controls_Manager::COLOR, 381 373 'selectors' => [ 382 374 '{{WRAPPER}} .title' => 'color: {{VALUE}}', … … 388 380 [ 389 381 'label' => __( 'Display', 'wpmp' ), 390 'type' => \Elementor\Controls_Manager::SELECT,382 'type' => Controls_Manager::SELECT, 391 383 'default' => '', 392 384 'options' => [ … … 406 398 'hr', 407 399 [ 408 'type' => \Elementor\Controls_Manager::DIVIDER,409 ] 410 ); 411 400 'type' => Controls_Manager::DIVIDER, 401 ] 402 ); 403 412 404 $element->add_control( 413 405 'wpmp-def_transform-origin', 414 406 [ 415 407 'label' => __( 'Transform Origin', 'wpmp' ), 416 'type' => \Elementor\Controls_Manager::SELECT,408 'type' => Controls_Manager::SELECT, 417 409 'default' => '', 418 410 'options' => [ … … 433 425 [ 434 426 'label' => __( 'Translate-X', 'wpmp' ), 435 'type' => \Elementor\Controls_Manager::NUMBER,427 'type' => Controls_Manager::NUMBER, 436 428 'step' => 1, 437 429 'default' => "", … … 442 434 [ 443 435 'label' => __( 'Translate-Y', 'wpmp' ), 444 'type' => \Elementor\Controls_Manager::NUMBER,436 'type' => Controls_Manager::NUMBER, 445 437 'step' => 1, 446 438 'default' => "", … … 451 443 [ 452 444 'label' => __( 'Translate-Z', 'wpmp' ), 453 'type' => \Elementor\Controls_Manager::NUMBER,445 'type' => Controls_Manager::NUMBER, 454 446 'step' => 1, 455 447 'default' => "", … … 460 452 [ 461 453 'label' => __( 'Scale-X', 'wpmp' ), 462 'type' => \Elementor\Controls_Manager::NUMBER,454 'type' => Controls_Manager::NUMBER, 463 455 'step' => 0,2, 464 456 'default' => "", … … 469 461 [ 470 462 'label' => __( 'Scale-Y', 'wpmp' ), 471 'type' => \Elementor\Controls_Manager::NUMBER,463 'type' => Controls_Manager::NUMBER, 472 464 'step' => 0,2, 473 465 'default' => "", … … 478 470 [ 479 471 'label' => __( 'Scale-Z', 'wpmp' ), 480 'type' => \Elementor\Controls_Manager::NUMBER,472 'type' => Controls_Manager::NUMBER, 481 473 'step' => 0,2, 482 474 'default' => "", … … 487 479 [ 488 480 'label' => __( 'Rotate-X', 'wpmp' ), 489 'type' => \Elementor\Controls_Manager::NUMBER,481 'type' => Controls_Manager::NUMBER, 490 482 'step' => 0,2, 491 483 'default' => "", … … 496 488 [ 497 489 'label' => __( 'Rotate-Y', 'wpmp' ), 498 'type' => \Elementor\Controls_Manager::NUMBER,490 'type' => Controls_Manager::NUMBER, 499 491 'step' => 0,2, 500 492 'default' => "", … … 505 497 [ 506 498 'label' => __( 'Rotate-Z', 'wpmp' ), 507 'type' => \Elementor\Controls_Manager::NUMBER,499 'type' => Controls_Manager::NUMBER, 508 500 'step' => 1, 509 501 'default' => "", … … 514 506 [ 515 507 'label' => __( 'Skew-Y', 'wpmp' ), 516 'type' => \Elementor\Controls_Manager::NUMBER,508 'type' => Controls_Manager::NUMBER, 517 509 'step' => 1, 518 510 'default' => "", … … 523 515 [ 524 516 'label' => __( 'Skew-Z', 'wpmp' ), 525 'type' => \Elementor\Controls_Manager::NUMBER,517 'type' => Controls_Manager::NUMBER, 526 518 'step' => 1, 527 519 'default' => "", … … 534 526 535 527 function add_scroll_magic_effect( $element, $section_id, $args ) { 536 /** @var \Elementor\Element_Base $element */537 528 if ( 'section_scrollmagic_control' === $section_id ) { 538 529 $element->start_controls_section( 539 530 'section_scrollmagic_effect', 540 531 [ 541 'tab' => \Elementor\Controls_Manager::TAB_STYLE,532 'tab' => Controls_Manager::TAB_STYLE, 542 533 'label' => __( 'Scroll Magic effect', 'wpmp' ), 543 534 ] 544 535 ); 545 $repeater_e = new \Elementor\Repeater();536 $repeater_e = new Repeater(); 546 537 $repeater_e->add_control( 547 538 'title_effect', 548 539 [ 549 540 'label' => __( 'Title', 'wpmp' ), 550 'type' => \Elementor\Controls_Manager::TEXT,541 'type' => Controls_Manager::TEXT, 551 542 'default' => __( 'Scenes', 'wpmp' ), 552 543 'placeholder' => __( 'Enter Scenes title', 'wpmp' ), … … 557 548 [ 558 549 'label' => __( 'Duration', 'wpmp' ), 559 'type' => \Elementor\Controls_Manager::NUMBER,550 'type' => Controls_Manager::NUMBER, 560 551 'step' => 1, 561 552 'default' => "1", … … 566 557 [ 567 558 'label' => __( 'Ease', 'wpmp' ), 568 'type' => \Elementor\Controls_Manager::SELECT,559 'type' => Controls_Manager::SELECT, 569 560 'default' => 'Power0.easeNone', 570 561 'options' => [ … … 608 599 [ 609 600 'label' => __( 'Wight', 'wpmp' ), 610 'type' => \Elementor\Controls_Manager::NUMBER,601 'type' => Controls_Manager::NUMBER, 611 602 'step' => 1, 612 603 'default' => "", … … 617 608 [ 618 609 'label' => __( 'Height', 'wpmp' ), 619 'type' => \Elementor\Controls_Manager::NUMBER,610 'type' => Controls_Manager::NUMBER, 620 611 'step' => 1, 621 612 'default' => "", … … 626 617 [ 627 618 'label' => __( 'Opacity', 'wpmp' ), 628 'type' => \Elementor\Controls_Manager::NUMBER,619 'type' => Controls_Manager::NUMBER, 629 620 'step' => 0.1,'min' => 0,'max' => 1, 630 621 'default' => 1, … … 635 626 [ 636 627 'label' => __( 'Color', 'wpmp' ), 637 'type' => \Elementor\Controls_Manager::COLOR, 638 'scheme' => [ 639 'type' => \Elementor\Scheme_Color::get_type(), 640 'value' => \Elementor\Scheme_Color::COLOR_1, 641 ], 628 'type' => Controls_Manager::COLOR, 642 629 'selectors' => [ 643 630 '{{WRAPPER}} .title' => 'color: {{VALUE}}', … … 649 636 [ 650 637 'label' => __( 'Background Color', 'wpmp' ), 651 'type' => \Elementor\Controls_Manager::COLOR, 652 'scheme' => [ 653 'type' => \Elementor\Scheme_Color::get_type(), 654 'value' => \Elementor\Scheme_Color::COLOR_1, 655 ], 638 'type' => Controls_Manager::COLOR, 656 639 'selectors' => [ 657 640 '{{WRAPPER}} .title' => 'color: {{VALUE}}', … … 663 646 [ 664 647 'label' => __( 'Display', 'wpmp' ), 665 'type' => \Elementor\Controls_Manager::SELECT,648 'type' => Controls_Manager::SELECT, 666 649 'default' => 'block', 667 650 'options' => [ … … 681 664 'hr', 682 665 [ 683 'type' => \Elementor\Controls_Manager::DIVIDER,666 'type' => Controls_Manager::DIVIDER, 684 667 ] 685 668 ); … … 688 671 [ 689 672 'label' => __( 'Transform Origin', 'wpmp' ), 690 'type' => \Elementor\Controls_Manager::SELECT,673 'type' => Controls_Manager::SELECT, 691 674 'default' => 'top-left', 692 675 'options' => [ … … 707 690 [ 708 691 'label' => __( 'Translate-X', 'wpmp' ), 709 'type' => \Elementor\Controls_Manager::NUMBER,692 'type' => Controls_Manager::NUMBER, 710 693 'step' => 1, 711 694 'default' => "", … … 716 699 [ 717 700 'label' => __( 'Translate-Y', 'wpmp' ), 718 'type' => \Elementor\Controls_Manager::NUMBER,701 'type' => Controls_Manager::NUMBER, 719 702 'step' => 1, 720 703 'default' => "", … … 725 708 [ 726 709 'label' => __( 'Translate-Z', 'wpmp' ), 727 'type' => \Elementor\Controls_Manager::NUMBER,710 'type' => Controls_Manager::NUMBER, 728 711 'step' => 1, 729 712 'default' => "", … … 734 717 [ 735 718 'label' => __( 'Scale-X', 'wpmp' ), 736 'type' => \Elementor\Controls_Manager::NUMBER,719 'type' => Controls_Manager::NUMBER, 737 720 'step' => 0,2, 738 721 'default' => "", … … 743 726 [ 744 727 'label' => __( 'Scale-Y', 'wpmp' ), 745 'type' => \Elementor\Controls_Manager::NUMBER,728 'type' => Controls_Manager::NUMBER, 746 729 'step' => 0,2, 747 730 'default' => "", … … 752 735 [ 753 736 'label' => __( 'Scale-Z', 'wpmp' ), 754 'type' => \Elementor\Controls_Manager::NUMBER,737 'type' => Controls_Manager::NUMBER, 755 738 'step' => 0,2, 756 739 'default' => "", … … 761 744 [ 762 745 'label' => __( 'Rotate-X', 'wpmp' ), 763 'type' => \Elementor\Controls_Manager::NUMBER,746 'type' => Controls_Manager::NUMBER, 764 747 'step' => 0,2, 765 748 'default' => "", … … 770 753 [ 771 754 'label' => __( 'Rotate-Y', 'wpmp' ), 772 'type' => \Elementor\Controls_Manager::NUMBER,755 'type' => Controls_Manager::NUMBER, 773 756 'step' => 0,2, 774 757 'default' => "", … … 779 762 [ 780 763 'label' => __( 'Rotate-Z', 'wpmp' ), 781 'type' => \Elementor\Controls_Manager::NUMBER,764 'type' => Controls_Manager::NUMBER, 782 765 'step' => 1, 783 766 'default' => "", … … 788 771 [ 789 772 'label' => __( 'Skew-Y', 'wpmp' ), 790 'type' => \Elementor\Controls_Manager::NUMBER,773 'type' => Controls_Manager::NUMBER, 791 774 'step' => 1, 792 775 'default' => "", … … 797 780 [ 798 781 'label' => __( 'Skew-Z', 'wpmp' ), 799 'type' => \Elementor\Controls_Manager::NUMBER,782 'type' => Controls_Manager::NUMBER, 800 783 'step' => 1, 801 784 'default' => "", … … 805 788 'hr2', 806 789 [ 807 'type' => \Elementor\Controls_Manager::DIVIDER,790 'type' => Controls_Manager::DIVIDER, 808 791 ] 809 792 ); … … 812 795 [ 813 796 'label' => __( 'Set yoyo', 'wpmp' ), 814 'type' => \Elementor\Controls_Manager::SWITCHER,797 'type' => Controls_Manager::SWITCHER, 815 798 'label_on' => __( 'On', 'wpmp' ), 816 799 'label_off' => __( 'Off', 'wpmp' ), … … 822 805 'wpmp_repeat', 823 806 [ 824 'type' => \Elementor\Controls_Manager::NUMBER,807 'type' => Controls_Manager::NUMBER, 825 808 'label' => __( 'Repeat effect', 'wpmp' ), 826 809 'step' => '1', … … 832 815 [ 833 816 'label' => __( 'Scenes', 'wpmp' ), 834 'type' => \Elementor\Controls_Manager::REPEATER,817 'type' => Controls_Manager::REPEATER, 835 818 'fields' => $repeater_e->get_controls(), 836 819 'default' => [], -
scroll-magic-addon-for-elementor/trunk/includes/elementor/css.class.php
r2288386 r2710554 72 72 73 73 public function enqueue_editor_scripts() { 74 wp_enqueue_script('prefix-editor-support-js', WPMP_SMG_ELE_URL.' public/js/edittor-shupport.js', array('jquery'), '', true);74 wp_enqueue_script('prefix-editor-support-js', WPMP_SMG_ELE_URL.'/assets/public/js/edittor-shupport.js', array('jquery'), WPMP_SMG_ELE_VERSION, true); 75 75 } 76 76 -
scroll-magic-addon-for-elementor/trunk/index.php
r2297466 r2710554 7 7 Author: MagicPages 8 8 */ 9 if ( ! defined( 'WPINC' )) {10 die;9 if (!defined('WPINC')) { 10 die; 11 11 } 12 12 13 defined( 'WPMP_SMG_ELE_VERSION' ) or define('WPMP_SMG_ELE_VERSION','1.0.1');14 defined( 'WPMP_SMG_ELE_URL' ) or define('WPMP_SMG_ELE_URL', plugins_url( '/', __FILE__ ));13 defined('WPMP_SMG_ELE_VERSION') or define('WPMP_SMG_ELE_VERSION', '1.1.0'); 14 defined('WPMP_SMG_ELE_URL') or define('WPMP_SMG_ELE_URL', plugins_url('/', __FILE__)); 15 15 16 defined( 'WPMP_CATEGORY' ) or define('WPMP_CATEGORY','Wpmp_SM_ctgr');16 defined('WPMP_CATEGORY') or define('WPMP_CATEGORY', 'Wpmp_SM_ctgr'); 17 17 18 if ( ! class_exists( 'Wpmp_ScrollMagic_Elementor' ) ) { 19 20 class Wpmp_ScrollMagic_Elementor{ 21 public function __construct(){ 22 add_action( 'init' ,[$this,'actionInit']); 18 if (!class_exists('Wpmp_ScrollMagic_Elementor')) { 23 19 24 } 25 function actionInit(){ 26 include_once 'includes/index.php'; 27 add_action( 'wp_enqueue_scripts', [ $this, 'enqueueScripts'] ); 20 class Wpmp_ScrollMagic_Elementor 21 { 22 public function __construct() 23 { 24 add_action('init', [$this, 'actionInit']); 25 } 26 27 function actionInit() 28 { 29 include_once 'includes/index.php'; 30 add_action('wp_enqueue_scripts', [$this, 'enqueueScripts']); 31 } 32 33 public function enqueueScripts() 34 { 35 wp_enqueue_style('wpmp-css', WPMP_SMG_ELE_URL . 'assets/public/css/wpmp.css'); 36 wp_enqueue_style('animate', WPMP_SMG_ELE_URL . 'assets/lib/animate/animate.min.css'); 37 wp_enqueue_style('magic', WPMP_SMG_ELE_URL . 'assets/lib/animate/magic.min.css'); 38 wp_enqueue_script('jQuery'); 39 wp_enqueue_script('gsap', WPMP_SMG_ELE_URL . 'assets/lib/gsap/gsap.min.js', array('jquery'), WPMP_SMG_ELE_VERSION, true); 40 wp_enqueue_script('DrawSVG', WPMP_SMG_ELE_URL . 'assets/lib/gsap/DrawSVG.min.js', array('jquery'), WPMP_SMG_ELE_VERSION, true); 41 wp_enqueue_script('SplitText3', WPMP_SMG_ELE_URL . 'assets/lib/gsap/SplitText3.min.js', array('jquery'), WPMP_SMG_ELE_VERSION, true); 42 wp_enqueue_script('ScrollMagic', WPMP_SMG_ELE_URL . 'assets/lib/scrollmagic/minified/ScrollMagic.min.js', array('jquery'), WPMP_SMG_ELE_VERSION, true); 43 wp_enqueue_script('animation-gsap', WPMP_SMG_ELE_URL . 'assets/lib/scrollmagic/minified/plugins/animation.gsap.min.js', array('jquery'), WPMP_SMG_ELE_VERSION, true); 44 wp_enqueue_script('debug-addIndicators', WPMP_SMG_ELE_URL . 'assets/lib/scrollmagic/minified/plugins/debug.addIndicators.min.js', array('jquery'), WPMP_SMG_ELE_VERSION, true); 45 wp_enqueue_script('wpmp-js', WPMP_SMG_ELE_URL . 'assets/public/js/wpmp.js', array('jquery'), WPMP_SMG_ELE_VERSION, true); 46 47 } 28 48 } 29 49 30 public function enqueueScripts() { 31 wp_enqueue_style( 'wpmp-css', WPMP_SMG_ELE_URL . 'assets/public/css/wpmp.css' ); 32 wp_enqueue_style( 'animate', WPMP_SMG_ELE_URL . 'assets/lib/animate/animate.min.css' ); 33 wp_enqueue_style( 'magic', WPMP_SMG_ELE_URL . 'assets/lib/animate/magic.min.css' ); 34 wp_enqueue_script( 'jQuery'); 35 wp_enqueue_script( 'gsap', WPMP_SMG_ELE_URL . 'assets/lib/gsap/gsap.min.js',array( 'jquery' ), WPMP_SMG_ELE_VERSION, true ); 36 wp_enqueue_script( 'DrawSVG', WPMP_SMG_ELE_URL . 'assets/lib/gsap/DrawSVG.min.js',array( 'jquery' ), WPMP_SMG_ELE_VERSION, true ); 37 wp_enqueue_script( 'SplitText3', WPMP_SMG_ELE_URL . 'assets/lib/gsap/SplitText3.min.js',array( 'jquery' ), WPMP_SMG_ELE_VERSION, true ); 38 wp_enqueue_script( 'ScrollMagic', WPMP_SMG_ELE_URL . 'assets/lib/scrollmagic/minified/ScrollMagic.min.js',array( 'jquery' ), WPMP_SMG_ELE_VERSION, true ); 39 wp_enqueue_script( 'animation-gsap', WPMP_SMG_ELE_URL . 'assets/lib/scrollmagic/minified/plugins/animation.gsap.min.js',array( 'jquery' ), WPMP_SMG_ELE_VERSION, true ); 40 wp_enqueue_script( 'debug-addIndicators', WPMP_SMG_ELE_URL . 'assets/lib/scrollmagic/minified/plugins/debug.addIndicators.min.js',array( 'jquery' ), WPMP_SMG_ELE_VERSION, true ); 41 wp_enqueue_script( 'wpmp-js', WPMP_SMG_ELE_URL . 'assets/public/js/wpmp.js', array( 'jquery' ), WPMP_SMG_ELE_VERSION, true ); 42 43 } 50 new Wpmp_ScrollMagic_Elementor(); 51 } 44 52 45 46 }47 new Wpmp_ScrollMagic_Elementor();48 }49 ?> -
scroll-magic-addon-for-elementor/trunk/readme.txt
r2297466 r2710554 56 56 57 57 == Changelog == 58 = 1.0.1 - 16/05/2022 = 59 - Fixed: Compatible with elementor version 3.6.4 58 60 59 61 = 1.0.1 - 04/05/2020 =
Note: See TracChangeset
for help on using the changeset viewer.