start_controls_section( 'eael_smooth_animation_section_controls', [ 'label' => __( ' Interactive Animations', 'essential-addons-elementor' ), 'tab' => Controls_Manager::TAB_ADVANCED, ] ); $element->add_control('eael_smooth_animation_section', [ 'label' => __('Enable Interactive Animations', 'essential-addons-elementor'), 'type' => Controls_Manager::SWITCHER, ] ); $element->add_control( 'eael_smooth_animation_event_function', [ 'label' => esc_html__( 'Animation Type', 'essential-addons-elementor' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'to', 'options' => [ 'to' => esc_html__( 'Animate To', 'essential-addons-elementor' ), 'from' => esc_html__( 'Animate From', 'essential-addons-elementor' ), ], 'condition' => [ 'eael_smooth_animation_section' => 'yes', ] ] ); //Color Setting $element->add_control( 'eael_smooth_animation_event_color_setting', [ 'label' => __( 'Animation Colors', 'essential-addons-elementor' ), 'type' => Controls_Manager::POPOVER_TOGGLE, 'return_value' => 'yes', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ] ] ); $element->start_popover(); $element->add_control( 'eael_smooth_animation_event_bg_color', [ 'label' => esc_html__( 'Bankground Color', 'essential-addons-elementor' ), 'type' => \Elementor\Controls_Manager::COLOR, 'condition' => [ 'eael_smooth_animation_event_color_setting' => 'yes', ] ] ); $element->end_popover(); //Transformation Setting $element->add_control( 'eael_smooth_animation_event_transform_setting', [ 'label' => __( 'Transform Effects', 'essential-addons-elementor' ), 'type' => Controls_Manager::POPOVER_TOGGLE, 'return_value' => 'yes', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ] ] ); $element->start_popover(); $element->add_control( 'eael_smooth_animation_event_transform_translatex', [ 'label' => esc_html__( 'TranslateX', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vw', 'vh' ], 'range' => [ 'px' => [ 'min' => -1000, 'max' => 1000, 'step' => 5, ], 'vw' => [ 'min' => -1000, 'max' => 1000, 'step' => 1, ], 'vh' => [ 'min' => -1000, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => -100, 'max' => 100, ], ], 'default' => [ 'size' => 30, ], 'ai' => [ 'active' => false, ], 'condition' => [ 'eael_smooth_animation_event_transform_setting' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_transform_translatex_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Move the element horizontally by a specified amount', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ], ] ); $element->add_control( 'eael_smooth_animation_event_transform_translatey', [ 'label' => esc_html__( 'TranslateY', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vw', 'vh' ], 'range' => [ 'px' => [ 'min' => -1000, 'max' => 1000, 'step' => 1, ], 'vw' => [ 'min' => -1000, 'max' => 1000, 'step' => 1, ], 'vh' => [ 'min' => -1000, 'max' => 1000, 'step' => 1, ], '%' => [ 'min' => -100, 'max' => 100, ], ], 'ai' => [ 'active' => false, ], 'condition' => [ 'eael_smooth_animation_event_transform_setting' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_transform_translatey_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Move the element vertically by a specified amount', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ], ] ); $element->add_control( 'eael_smooth_animation_event_transform_opacity', [ 'label' => esc_html__( 'Opacity', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1, 'step' => .1, ], ], 'default' => [ 'size' => 1, ], 'ai' => [ 'active' => false, ], 'condition' => [ 'eael_smooth_animation_event_transform_setting' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_transform_rotate', [ 'label' => esc_html__( 'Rotate', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -360, 'max' => 360, 'step' => 1, ], ], 'ai' => [ 'active' => false, ], 'condition' => [ 'eael_smooth_animation_event_transform_setting' => 'yes', ] ] ); $element->end_popover(); //Transformation Setting $element->add_control( 'eael_smooth_animation_event_transform_orign_setting', [ 'label' => __( 'Transform Origin Effects', 'essential-addons-elementor' ), 'type' => Controls_Manager::POPOVER_TOGGLE, 'return_value' => 'yes', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ] ] ); $element->start_popover(); //TransformOrigin $element->add_control( 'eael_smooth_animation_transform_originx', array( 'label' => __( 'Transform Origin X', 'essential-addons-elementor' ), 'type' => \Elementor\Controls_Manager::SELECT, 'options' => [ '' => __( 'None', 'essential-addons-elementor' ), 'top' => __( 'Top', 'essential-addons-elementor' ), 'left' => __( 'Left', 'essential-addons-elementor' ), 'bottom' => __( 'Bottom', 'essential-addons-elementor' ), 'right' => __( 'Right', 'essential-addons-elementor' ), 'custom' => __( 'Custom', 'essential-addons-elementor' ), ], 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_event_transform_orign_setting' => 'yes', ] ) ); $element->add_control( 'eael_smooth_animation_trans_originx_custom', array( 'label' => __( 'Custom Origin', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%' ), 'range' => array( 'px' => array( 'min' => -100, 'max' => 100, ), '%' => array( 'min' => -100, 'max' => 100, ), ), 'label_block' => true, 'condition' => array( 'eael_smooth_animation_transform_originx' => 'custom', 'eael_smooth_animation_event_transform_orign_setting' => 'yes', ), ) ); $element->add_control( 'eael_smooth_animation_transform_originx_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Set the horizontal pivot point for transformations', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ], ] ); $element->add_control( 'eael_smooth_animation_transform_originy', array( 'label' => __( 'Transform Origin Y', 'essential-addons-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => array( '' => __( 'None', 'essential-addons-elementor' ), 'top' => __( 'Top', 'essential-addons-elementor' ), 'left' => __( 'Left', 'essential-addons-elementor' ), 'bottom' => __( 'Bottom', 'essential-addons-elementor' ), 'right' => __( 'Right', 'essential-addons-elementor' ), 'custom' => __( 'Custom', 'essential-addons-elementor' ), ), 'label_block' => false, 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_event_transform_orign_setting' => 'yes', ] ) ); $element->add_control( 'eael_smooth_animation_trans_originy_custom', array( 'label' => __( 'Custom Origin', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%' ), 'range' => array( 'px' => array( 'min' => -100, 'max' => 100, ), '%' => array( 'min' => -100, 'max' => 100, ), ), 'label_block' => true, 'condition' => array( 'eael_smooth_animation_transform_originy' => 'custom', 'eael_smooth_animation_event_transform_orign_setting' => 'yes', ), ) ); $element->add_control( 'eael_smooth_animation_transform_originy_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Set the Vertical pivot point for transformations', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ], ] ); $element->end_popover(); //Scale Setting $element->add_control( 'eael_smooth_animation_event_scale_setting', [ 'label' => __( 'Scaling Options', 'essential-addons-elementor' ), 'type' => Controls_Manager::POPOVER_TOGGLE, 'return_value' => 'yes', 'condition' => [ 'eael_smooth_animation_section' => 'yes' ] ] ); $element->start_popover(); $element->add_control( 'eael_smooth_animation_event_scalexy', [ 'label' => esc_html__( 'Keep Proportions', 'essential-addons-elementor' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'On', 'essential-addons-elementor' ), 'label_off' => esc_html__( 'Off', 'essential-addons-elementor' ), 'return_value' => 'yes', ] ); $element->add_control( 'eael_smooth_animation_event_scale', [ 'label' => esc_html__( 'Scale', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 5, 'step' => 0.1, ], ], 'default' => [ 'size' => 1.3, ], 'ai' => [ 'active' => false, ], 'condition' => [ 'eael_smooth_animation_event_scale_setting' => 'yes', 'eael_smooth_animation_event_scalexy' => '', ] ] ); $element->add_control( 'eael_smooth_animation_event_scalex', [ 'label' => esc_html__( 'ScaleX', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 5, 'step' => 0.1, ], ], 'default' => [ 'size' => 1.3, ], 'ai' => [ 'active' => false, ], 'condition' => [ 'eael_smooth_animation_event_scale_setting' => 'yes', 'eael_smooth_animation_event_scalexy' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_scalex_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Scale the width of the element', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_event_scalexy' => 'yes', ], ] ); $element->add_control( 'eael_smooth_animation_event_scaley', [ 'label' => esc_html__( 'ScaleY', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 5, 'step' => 0.1, ], ], 'default' => [ 'size' => 0.8, ], 'ai' => [ 'active' => false, ], 'condition' => [ 'eael_smooth_animation_event_scale_setting' => 'yes', 'eael_smooth_animation_event_scalexy' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_scaley_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Scale the height of the element', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_event_scalexy' => 'yes', ], ] ); $element->end_popover(); //Skew Setting $element->add_control( 'eael_smooth_animation_event_skew_setting', [ 'label' => __( 'Skew Effects', 'essential-addons-elementor' ), 'type' => Controls_Manager::POPOVER_TOGGLE, 'return_value' => 'yes', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ] ] ); $element->start_popover(); // $element->add_control( // 'eael_smooth_animation_event_skew', // [ // 'label' => esc_html__( 'Skew', 'essential-addons-elementor' ), // 'type' => Controls_Manager::SLIDER, // 'range' => [ // 'px' => [ // 'min' => 0, // 'max' => 100, // 'step' => 1, // ], // ], // 'ai' => [ 'active' => false, ], // 'condition' => [ // 'eael_smooth_animation_event_skew_setting' => 'yes', // ] // ] // ); $element->add_control( 'eael_smooth_animation_event_skewx', [ 'label' => esc_html__( 'SkewX', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], ], 'default' => [ 'size' => 5, ], 'ai' => [ 'active' => false, ], 'condition' => [ 'eael_smooth_animation_event_skew_setting' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_skewy', [ 'label' => esc_html__( 'SkewY', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], ], 'default' => [ 'size' => -5, ], 'ai' => [ 'active' => false, ], 'condition' => [ 'eael_smooth_animation_event_skew_setting' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_skew_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Skew the element to create an angled effect along the x or y axis.', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ], ] ); $element->end_popover(); //Animation Setting $element->add_control( 'eael_smooth_animation_event_animation_setting', [ 'label' => __( 'Animation Settings', 'essential-addons-elementor' ), 'type' => Controls_Manager::POPOVER_TOGGLE, 'return_value' => 'yes', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ] ] ); $element->start_popover(); $element->add_control( 'eael_smooth_animation_event_animation_easing', [ 'label' => esc_html__( 'Easing', 'essential-addons-elementor' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'linear', 'options' => [ '' => esc_html__( 'Default', 'essential-addons-elementor' ), 'linear' => esc_html__( 'Linear', 'essential-addons-elementor' ), 'back' => esc_html__( 'Back', 'essential-addons-elementor' ), 'power' => esc_html__( 'Power', 'essential-addons-elementor' ), 'bounce' => esc_html__( 'Bounce', 'essential-addons-elementor' ), 'circ' => esc_html__( 'Circ', 'essential-addons-elementor' ), 'elastic' => esc_html__( 'Elastic', 'essential-addons-elementor' ), 'expo' => esc_html__( 'Expo', 'essential-addons-elementor' ), 'sine' => esc_html__( 'Sine', 'essential-addons-elementor' ), 'steps' => esc_html__( 'Steps', 'essential-addons-elementor' ), ], 'condition' => [ 'eael_smooth_animation_event_animation_setting' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_animation_easing_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Adjust how the animation progresses over time for different effects', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ], ] ); $element->add_control( 'eael_smooth_animation_event_animation_easing_type', [ 'label' => esc_html__( 'Easing Type', 'essential-addons-elementor' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'in', 'options' => [ 'in' => esc_html__( 'In', 'essential-addons-elementor' ), 'out' => esc_html__( 'Out', 'essential-addons-elementor' ), 'inOut' => esc_html__( 'InOut', 'essential-addons-elementor' ), ], 'condition' => [ 'eael_smooth_animation_event_animation_setting' => 'yes', 'eael_smooth_animation_event_animation_easing' => ['back', 'power', 'bounce', 'circ', 'elastic', 'expo', 'sine'], ] ] ); $element->add_control( 'eael_smooth_animation_event_animation_yoyo', [ 'label' => esc_html__( 'Yoyo', 'essential-addons-elementor' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'essential-addons-elementor' ), 'label_off' => esc_html__( 'Hide', 'essential-addons-elementor' ), 'return_value' => 'true', 'default' => 'true', 'condition' => [ 'eael_smooth_animation_event_animation_setting' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_animation_yoyo_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Makes the animation reverse direction on each repeat', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ], ] ); $element->add_control( 'eael_smooth_animation_event_animation_stagger', [ 'label' => esc_html__( 'Stagger', 'essential-addons-elementor' ), 'type' => Controls_Manager::NUMBER, 'min' => 0, 'max' => 10, 'step' => 0.1, 'ai' => [ 'active' =>false, ], 'condition' => [ 'eael_smooth_animation_event_animation_setting' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_animation_stagger_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Add a delay between the start times of animations on multiple elements', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ], ] ); $element->end_popover(); //Manual Setting $element->add_control( 'eael_smooth_animation_event_manual_setting', [ 'label' => __( 'Custom Animation Config', 'essential-addons-elementor' ), 'type' => Controls_Manager::POPOVER_TOGGLE, 'return_value' => 'yes', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ] ] ); $element->start_popover(); $element->add_control( 'eael_smooth_animation_event_duration', [ 'label' => esc_html__( 'Duration', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 20, 'step' => 1, ], ], 'default' => [ 'size' => 3, ], 'ai' => [ 'active' => false, ], 'condition' => [ 'eael_smooth_animation_event_manual_setting' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_delay', [ 'label' => esc_html__( 'Delay', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 20, 'step' => 1, ], ], 'ai' => [ 'active' => false, ], 'condition' => [ 'eael_smooth_animation_event_manual_setting' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_loop', [ 'label' => esc_html__( 'Loop Count', 'essential-addons-elementor' ), 'type' => \Elementor\Controls_Manager::NUMBER, 'min' => -1, 'max' => 100, 'step' => 1, 'default' => 10, 'condition' => [ 'eael_smooth_animation_event_manual_setting' => 'yes', ] ] ); $element->end_popover(); //Custom Trigger $element->add_control( 'eael_smooth_animation_event_core_custom_trigger', [ 'label' => esc_html__( 'Target Element', 'essential-addons-elementor' ), 'type' => \Elementor\Controls_Manager::TEXT, 'ai' => [ 'active' =>false, ], 'placeholder' => esc_html__( 'my-element', 'essential-addons-elementor' ), 'condition' => [ 'eael_smooth_animation_section' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_core_custom_trigger_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( '(Optional) Enter the CSS selector of the element to animate, like: my-element', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ], ] ); $element->add_control( 'eael_smooth_animation_scroll_trigger_before', [ 'type' => \Elementor\Controls_Manager::DIVIDER, 'condition' => [ 'eael_smooth_animation_section' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_scroll_trigger_heading', [ 'label' => esc_html__( 'ScrollTrigger Options', 'essential-addons-elementor' ), 'type' => \Elementor\Controls_Manager::HEADING, 'condition' => [ 'eael_smooth_animation_section' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_scroll_trigger', [ 'label' => esc_html__( 'Enable ScrollTrigger', 'essential-addons-elementor' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'essential-addons-elementor' ), 'label_off' => esc_html__( 'Hide', 'essential-addons-elementor' ), 'return_value' => 'true', 'condition' => [ 'eael_smooth_animation_section' => 'yes', ] ] ); $element->add_control( 'eael_smooth_animation_event_canvas_start', [ 'label' => esc_html__( 'Scroll Start Point', 'essential-addons-elementor' ), 'type' => Controls_Manager::POPOVER_TOGGLE, 'return_value' => 'yes', 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_scroll_trigger' => 'true', ] ] ); $element->start_popover(); $element->add_control( 'eael_smooth_animation_event_canvas_element_start', array( 'label' => __( 'Start Element', 'essential-addons-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => array( '' => __( 'None', 'essential-addons-elementor' ), 'top' => __( 'Top', 'essential-addons-elementor' ), 'bottom' => __( 'Bottom', 'essential-addons-elementor' ), 'center' => __( 'Center', 'essential-addons-elementor' ), 'custom' => __( 'Custom', 'essential-addons-elementor' ), ), 'label_block' => false, 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_event_canvas_start' => 'yes', ] ) ); $element->add_control( 'eael_smooth_animation_event_canvas_element_start_custom', array( 'label' => __( 'Custom Value', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 1000, ), '%' => array( 'min' => 0, 'max' => 100, ), ), 'label_block' => true, 'condition' => array( 'eael_smooth_animation_event_canvas_element_start' => 'custom', 'eael_smooth_animation_event_canvas_start' => 'yes', ), ) ); $element->add_control( 'eael_smooth_animation_event_canvas_controller_start', array( 'label' => __( 'Start Controller', 'essential-addons-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => array( '' => __( 'None', 'essential-addons-elementor' ), 'top' => __( 'Top', 'essential-addons-elementor' ), 'bottom' => __( 'Bottom', 'essential-addons-elementor' ), 'center' => __( 'Center', 'essential-addons-elementor' ), 'custom' => __( 'Custom', 'essential-addons-elementor' ), ), 'label_block' => false, 'condition' => [ 'eael_smooth_animation_event_canvas_start' => 'yes', ] ) ); $element->add_control( 'eael_smooth_animation_event_canvas_controller_start_custom', array( 'label' => __( 'Custom Value', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 1000, ), '%' => array( 'min' => 0, 'max' => 100, ), ), 'label_block' => true, 'condition' => array( 'eael_smooth_animation_event_canvas_controller_start' => 'custom', 'eael_smooth_animation_event_canvas_start' => 'yes', ), ) ); $element->end_popover(); $element->add_control( 'eael_smooth_animation_event_canvas_end', [ 'label' => esc_html__( 'Start End Point', 'essential-addons-elementor' ), 'type' => Controls_Manager::POPOVER_TOGGLE, 'return_value' => 'yes', 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_scroll_trigger' => 'true', ] ] ); $element->start_popover(); $element->add_control( 'eael_smooth_animation_event_canvas_element_end', array( 'label' => __( 'End Element', 'essential-addons-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => array( '' => __( 'None', 'essential-addons-elementor' ), 'top' => __( 'Top', 'essential-addons-elementor' ), 'bottom' => __( 'Bottom', 'essential-addons-elementor' ), 'center' => __( 'Center', 'essential-addons-elementor' ), 'custom' => __( 'Custom', 'essential-addons-elementor' ), ), 'label_block' => false, 'condition' => [ 'eael_smooth_animation_event_canvas_end' => 'yes', ] ) ); $element->add_control( 'eael_smooth_animation_event_canvas_element_end_custom', array( 'label' => __( 'Custom Value', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 1000, ), '%' => array( 'min' => 0, 'max' => 100, ), ), 'label_block' => true, 'condition' => array( 'eael_smooth_animation_event_canvas_element_end' => 'custom', 'eael_smooth_animation_event_canvas_end' => 'yes', ), ) ); $element->add_control( 'eael_smooth_animation_event_canvas_controller_end', array( 'label' => __( 'End Controller', 'essential-addons-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => array( '' => __( 'None', 'essential-addons-elementor' ), 'top' => __( 'Top', 'essential-addons-elementor' ), 'bottom' => __( 'Bottom', 'essential-addons-elementor' ), 'center' => __( 'Center', 'essential-addons-elementor' ), 'custom' => __( 'Custom', 'essential-addons-elementor' ), ), 'label_block' => false, 'condition' => [ 'eael_smooth_animation_event_canvas_end' => 'yes', ] ) ); $element->add_control( 'eael_smooth_animation_event_canvas_controller_end_custom', array( 'label' => __( 'Custom Value', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( 'px', '%' ), 'range' => array( 'px' => array( 'min' => 0, 'max' => 1000, ), '%' => array( 'min' => 0, 'max' => 100, ), ), 'label_block' => true, 'condition' => array( 'eael_smooth_animation_event_canvas_controller_end' => 'custom', 'eael_smooth_animation_event_canvas_end' => 'yes', ), ) ); $element->end_popover(); $element->add_control( 'eael_smooth_animation_event_markers', [ 'label' => esc_html__( 'Enable Markers', 'essential-addons-elementor' ), 'type' => \Elementor\Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Show', 'essential-addons-elementor' ), 'label_off' => esc_html__( 'Hide', 'essential-addons-elementor' ), 'return_value' => 'true', 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_scroll_trigger' => 'true', ] ] ); $element->add_control( 'eael_smooth_animation_event_markers_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Show markers during development to see where animations start and end', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_scroll_trigger' => 'true', ], ] ); $element->add_control( 'eael_smooth_animation_event_canvas_scrub', [ 'label' => esc_html__( 'Scrubbing Options', 'essential-addons-elementor' ), 'type' => Controls_Manager::POPOVER_TOGGLE, 'return_value' => 'yes', 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_scroll_trigger' => 'true', ] ] ); $element->start_popover(); $element->add_control( 'eael_smooth_animation_event_scrub_settings', array( 'label' => __( 'Select Options', 'essential-addons-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'true', 'options' => array( 'true' => __( 'Default', 'essential-addons-elementor' ), 'custom' => __( 'Custom', 'essential-addons-elementor' ), ), 'condition' => [ 'eael_smooth_animation_event_canvas_scrub' => 'yes', ] ) ); // $element->add_control( // 'eael_smooth_animation_event_scrub_setting_default', // [ // 'label' => esc_html__( 'Select Default', 'essential-addons-elementor' ), // 'type' => Controls_Manager::SWITCHER, // 'label_on' => esc_html__( 'True', 'essential-addons-elementor' ), // 'label_off' => esc_html__( 'False', 'essential-addons-elementor' ), // 'return_value' => 'true', // 'condition' => [ // 'eael_smooth_animation_event_scrub_settings' => 'default', // 'eael_smooth_animation_event_canvas_scrub' => 'yes', // ] // ] // ); $element->add_control( 'eael_smooth_animation_event_canvas_scrub_custom', [ 'label' => esc_html__( 'Custom Scrub', 'essential-addons-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1, 'step' => .1, ], ], 'condition' => [ 'eael_smooth_animation_event_scrub_settings' => 'custom', 'eael_smooth_animation_event_canvas_scrub' => 'yes', ] ] ); $element->end_popover(); $element->add_control( 'eael_smooth_animation_event_canvas_scrub_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Allow the animation to sync with the scroll position', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_scroll_trigger' => 'true', ], ] ); $element->add_control( 'eael_smooth_animation_toggle_actions', [ 'label' => esc_html__( 'ToggleActions', 'essential-addons-elementor' ), 'type' => Controls_Manager::POPOVER_TOGGLE, 'return_value' => 'yes', 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_scroll_trigger' => 'true', ] ] ); $element->start_popover(); $element->add_control( 'eael_smooth_animation_toggle_actions_on_enter', array( 'label' => __( 'On Enter', 'essential-addons-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'options' => array( 'none' => __( 'None', 'essential-addons-elementor' ), 'restart' => __( 'Restart', 'essential-addons-elementor' ), 'resume' => __( 'Resume', 'essential-addons-elementor' ), 'reverse' => __( 'Reverse', 'essential-addons-elementor' ), 'reset' => __( 'Reset', 'essential-addons-elementor' ), 'play' => __( 'Play', 'essential-addons-elementor' ), 'pause' => __( 'Pause', 'essential-addons-elementor' ), 'complete' => __( 'Complete', 'essential-addons-elementor' ), ), 'label_block' => false, 'condition' => [ 'eael_smooth_animation_toggle_actions' => 'yes', ] ) ); $element->add_control( 'eael_smooth_animation_toggle_actions_on_leave', array( 'label' => __( 'On Leave', 'essential-addons-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'options' => array( 'none' => __( 'None', 'essential-addons-elementor' ), 'restart' => __( 'Restart', 'essential-addons-elementor' ), 'resume' => __( 'Resume', 'essential-addons-elementor' ), 'reverse' => __( 'Reverse', 'essential-addons-elementor' ), 'reset' => __( 'Reset', 'essential-addons-elementor' ), 'play' => __( 'Play', 'essential-addons-elementor' ), 'pause' => __( 'Pause', 'essential-addons-elementor' ), 'complete' => __( 'Complete', 'essential-addons-elementor' ), ), 'label_block' => false, 'condition' => [ 'eael_smooth_animation_toggle_actions' => 'yes', ] ) ); $element->add_control( 'eael_smooth_animation_toggle_actions_on_enter_back', array( 'label' => __( 'On Enter Back', 'essential-addons-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'options' => array( 'none' => __( 'None', 'essential-addons-elementor' ), 'restart' => __( 'Restart', 'essential-addons-elementor' ), 'resume' => __( 'Resume', 'essential-addons-elementor' ), 'reverse' => __( 'Reverse', 'essential-addons-elementor' ), 'reset' => __( 'Reset', 'essential-addons-elementor' ), 'play' => __( 'Play', 'essential-addons-elementor' ), 'pause' => __( 'Pause', 'essential-addons-elementor' ), 'complete' => __( 'Complete', 'essential-addons-elementor' ), ), 'label_block' => false, 'condition' => [ 'eael_smooth_animation_toggle_actions' => 'yes', ] ) ); $element->add_control( 'eael_smooth_animation_toggle_actions_on_leave_back', array( 'label' => __( 'On Leave Back', 'essential-addons-elementor' ), 'type' => Controls_Manager::SELECT, 'default' => 'none', 'options' => array( 'none' => __( 'None', 'essential-addons-elementor' ), 'restart' => __( 'Restart', 'essential-addons-elementor' ), 'resume' => __( 'Resume', 'essential-addons-elementor' ), 'reverse' => __( 'Reverse', 'essential-addons-elementor' ), 'reset' => __( 'Reset', 'essential-addons-elementor' ), 'play' => __( 'Play', 'essential-addons-elementor' ), 'pause' => __( 'Pause', 'essential-addons-elementor' ), 'complete' => __( 'Complete', 'essential-addons-elementor' ), ), 'label_block' => false, 'condition' => [ 'eael_smooth_animation_toggle_actions' => 'yes', ] ) ); $element->end_popover(); $element->add_control( 'eael_smooth_animation_toggle_actions_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Define what actions occur at each scroll trigger point', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_scroll_trigger' => 'true', ], ] ); $element->add_control( 'eael_smooth_animation_event_pin', [ 'label' => esc_html__( 'Pin Settings', 'essential-addons-elementor' ), 'type' => Controls_Manager::POPOVER_TOGGLE, 'return_value' => 'yes', 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_scroll_trigger' => 'true', ] ] ); $element->start_popover(); $element->add_control( 'eael_smooth_animation_event_pin_setting_default', [ 'label' => esc_html__( 'Enable Pin', 'essential-addons-elementor' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'True', 'essential-addons-elementor' ), 'label_off' => esc_html__( 'False', 'essential-addons-elementor' ), 'return_value' => 'true', 'condition' => [ 'eael_smooth_animation_event_pin' => 'yes', ] ] ); $element->end_popover(); $element->add_control( 'eael_smooth_animation_event_pin_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( 'Pin elements to the screen during the scroll for a fixed effect', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_scroll_trigger' => 'true', ], ] ); $element->add_control( 'eael_smooth_animation_event_scroll_custom_trigger', [ 'label' => esc_html__( 'Trigger Element', 'essential-addons-elementor' ), 'type' => \Elementor\Controls_Manager::TEXT, 'ai' => [ 'active' =>false, ], 'placeholder' => esc_html__( 'my-element', 'essential-addons-elementor' ), 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_scroll_trigger' => 'true', ] ] ); $element->add_control( 'eael_smooth_animation_event_scroll_custom_trigger_note', [ 'type' => Controls_Manager :: RAW_HTML, 'raw' => __( '(Optional) Enter the CSS selector for the element that triggers the animation when scrolled into view like: my-element', 'essential-addons-elementor' ), 'content_classes' => 'elementor-control-field-description', 'condition' => [ 'eael_smooth_animation_section' => 'yes', 'eael_smooth_animation_scroll_trigger' => 'true', ], ] ); $element->add_control( 'eael_smooth_animation_scroll_trigger_after', [ 'type' => \Elementor\Controls_Manager::DIVIDER, 'condition' => [ 'eael_smooth_animation_section' => 'yes', ] ] ); // $element->add_control('eael_smooth_animation_update', [ 'label' => '