start_controls_section( 'section_images', [ 'label' => esc_html__( 'Images', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $repeater = new Repeater(); $repeater->add_control( 'image', [ 'label' => esc_html__( 'Choose Image', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::MEDIA, 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::IMAGE_CATEGORY ] ], ] ); $repeater->add_control( 'title', [ 'label' => esc_html__( 'Title', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::TEXT_CATEGORY ] ], 'label_block' => true, ] ); $repeater->add_control( 'description', [ 'label' => esc_html__( 'Description', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::TEXT_CATEGORY ] ], 'rows' => 3, ] ); $this->add_control( 'images_list', [ 'label' => esc_html__( 'Images List', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'title' => 'Sample Image 1' ], [ 'title' => 'Sample Image 2' ], [ 'title' => 'Sample Image 3' ], [ 'title' => 'Sample Image 4' ], [ 'title' => 'Sample Image 5' ], [ 'title' => 'Sample Image 6' ], ], 'title_field' => '{{{ title }}}', ] ); $this->end_controls_section(); /* ═══════════════════════════════════════ CONTENT: Configuration ═══════════════════════════════════════ */ $this->start_controls_section( 'section_config', [ 'label' => esc_html__( 'Settings', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_CONTENT, ] ); $this->add_control( 'target_node_count', [ 'label' => esc_html__( 'Total Sphere Nodes', 'addronix-addons-for-elementor' ), 'description' => esc_html__( 'Automatically repeats your uploaded images to fill the sphere with this many nodes. Set to 0 to only show exactly what you uploaded.', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::NUMBER, 'min' => 0, 'max' => 100, 'step' => 1, 'default' => 30, ] ); // Image scale moved to style section $this->add_control( 'auto_rotate', [ 'label' => esc_html__( 'Auto Rotate', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SWITCHER, 'label_on' => esc_html__( 'Yes', 'addronix-addons-for-elementor' ), 'label_off' => esc_html__( 'No', 'addronix-addons-for-elementor' ), 'return_value' => 'yes', 'default' => 'yes', ] ); $this->add_control( 'auto_rotate_speed', [ 'label' => esc_html__( 'Auto Rotate Speed', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -2.0, 'max' => 2.0, 'step' => 0.1 ] ], 'default' => [ 'size' => 0.2 ], 'condition' => [ 'auto_rotate' => 'yes' ], ] ); $this->add_control( 'physics_heading', [ 'label' => esc_html__( 'Physics', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'drag_sensitivity', [ 'label' => esc_html__( 'Drag Sensitivity', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0.1, 'max' => 2.0, 'step' => 0.1 ] ], 'default' => [ 'size' => 0.8 ], ] ); $this->add_control( 'momentum_decay', [ 'label' => esc_html__( 'Momentum Decay', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0.8, 'max' => 0.99, 'step' => 0.01 ] ], 'default' => [ 'size' => 0.96 ], ] ); $this->add_control( 'max_rotation_speed', [ 'label' => esc_html__( 'Max Rotation Speed', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 1, 'max' => 10, 'step' => 0.5 ] ], 'default' => [ 'size' => 6 ], ] ); $this->end_controls_section(); /* ── STYLE: Sphere ── */ $this->start_controls_section( 'style_sphere', [ 'label' => esc_html__( 'Sphere Sizes', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'container_size', [ 'label' => esc_html__( 'Container Size', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'vw', '%' ], 'range' => [ 'px' => [ 'min' => 300, 'max' => 1200 ] ], 'default' => [ 'size' => 600 ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere-wrapper' => '--aafe-container-size: {{SIZE}}{{UNIT}};' ], 'render_type' => 'template', ] ); $this->add_responsive_control( 'sphere_radius', [ 'label' => esc_html__( 'Sphere Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vw' ], 'range' => [ 'px' => [ 'min' => 50, 'max' => 600, 'step' => 1 ], '%' => [ 'min' => 10, 'max' => 50, 'step' => 1 ], ], 'default' => [ 'size' => 35, 'unit' => '%' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere-wrapper' => '--aafe-sphere-radius: {{SIZE}}{{UNIT}};' ], 'render_type' => 'template', ] ); $this->end_controls_section(); /* ── STYLE: Images ── */ $this->start_controls_section( 'style_images', [ 'label' => esc_html__( 'Images', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'base_image_scale', [ 'label' => esc_html__( 'Base Image Scale', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0.05, 'max' => 0.5, 'step' => 0.01 ] ], 'default' => [ 'size' => 0.15 ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere-wrapper' => '--aafe-base-scale: {{SIZE}};' ], 'render_type' => 'template', ] ); $this->add_responsive_control( 'hover_scale', [ 'label' => esc_html__( 'Hover Scale', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 1.0, 'max' => 2.0, 'step' => 0.1 ] ], 'default' => [ 'size' => 1.3 ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere-wrapper' => '--aafe-hover-scale: {{SIZE}};' ], 'render_type' => 'template', ] ); $this->add_control( 'image_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'default' => [ 'top' => 50, 'right' => 50, 'bottom' => 50, 'left' => 50, 'unit' => '%', 'isLinked' => true ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__img-wrap' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'image_border', 'selector' => '{{WRAPPER}} .aafe-image-sphere__img-wrap', ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'image_shadow', 'selector' => '{{WRAPPER}} .aafe-image-sphere__img-wrap', ] ); $this->add_control( 'image_hover_transition', [ 'label' => esc_html__( 'Hover Transition Duration (ms)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 1000, 'step' => 50 ] ], 'default' => [ 'size' => 200, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__node' => '--aafe-transition: {{SIZE}}ms;' ], ] ); $this->start_controls_tabs( 'image_effects_tabs' ); $this->start_controls_tab( 'image_effects_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'image_opacity', [ 'label' => esc_html__( 'Opacity', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'max' => 1, 'min' => 0.10, 'step' => 0.01 ] ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__node' => 'opacity: {{SIZE}};' ], ] ); $this->add_group_control( \Elementor\Group_Control_Css_Filter::get_type(), [ 'name' => 'image_css_filters', 'selector' => '{{WRAPPER}} .aafe-image-sphere__img-wrap', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'image_effects_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'image_opacity_hover', [ 'label' => esc_html__( 'Opacity', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'max' => 1, 'min' => 0.10, 'step' => 0.01 ] ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__node:hover' => 'opacity: {{SIZE}};' ], ] ); $this->add_group_control( \Elementor\Group_Control_Css_Filter::get_type(), [ 'name' => 'image_css_filters_hover', 'selector' => '{{WRAPPER}} .aafe-image-sphere__node:hover .aafe-image-sphere__img-wrap', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); /* ═══════════════════════════════════════ STYLE: Modal ═══════════════════════════════════════ */ $this->start_controls_section( 'style_modal', [ 'label' => esc_html__( 'Modal Spotlight', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'modal_overlay_bg', [ 'label' => esc_html__( 'Overlay Background', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_TEXT ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-overlay' => 'background-color: {{VALUE}};' ], ] ); $this->add_control( 'modal_bg', [ 'label' => esc_html__( 'Modal Background', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_SECONDARY ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-content' => 'background-color: {{VALUE}};' ], ] ); $this->add_responsive_control( 'modal_max_width', [ 'label' => esc_html__( 'Modal Max Width', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'vw' ], 'range' => [ 'px' => [ 'min' => 200, 'max' => 1200 ], '%' => [ 'min' => 10, 'max' => 100 ] ], 'default' => [ 'size' => 450, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-content' => 'max-width: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'modal_text_align', [ 'label' => esc_html__( 'Alignment', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => 'Left', 'icon' => 'eicon-text-align-left' ], 'center' => [ 'title' => 'Center', 'icon' => 'eicon-text-align-center' ], 'right' => [ 'title' => 'Right', 'icon' => 'eicon-text-align-right' ], 'justify'=> [ 'title' => 'Justified', 'icon' => 'eicon-text-align-justify' ], ], 'default' => 'left', 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-content' => 'text-align: {{VALUE}};' ], ] ); $this->add_responsive_control( 'modal_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-info' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'modal_margin', [ 'label' => esc_html__( 'Margin', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-content' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'modal_border', 'selector' => '{{WRAPPER}} .aafe-image-sphere__modal-content', ] ); $this->add_control( 'modal_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'modal_box_shadow', 'selector' => '{{WRAPPER}} .aafe-image-sphere__modal-content', ] ); $this->add_control( 'heading_title_style', [ 'label' => esc_html__( 'Title', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'title_color', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_PRIMARY ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-title' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_PRIMARY ], 'selector' => '{{WRAPPER}} .aafe-image-sphere__modal-title', ] ); $this->add_group_control( \Elementor\Group_Control_Text_Shadow::get_type(), [ 'name' => 'title_text_shadow', 'selector' => '{{WRAPPER}} .aafe-image-sphere__modal-title', ] ); $this->add_responsive_control( 'title_margin', [ 'label' => esc_html__( 'Margin', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'title_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_control( 'heading_desc_style', [ 'label' => esc_html__( 'Description', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'desc_color', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'global' => [ 'default' => Global_Colors::COLOR_TEXT ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-desc' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'desc_typography', 'global' => [ 'default' => Global_Typography::TYPOGRAPHY_TEXT ], 'selector' => '{{WRAPPER}} .aafe-image-sphere__modal-desc', ] ); $this->add_group_control( \Elementor\Group_Control_Text_Shadow::get_type(), [ 'name' => 'desc_text_shadow', 'selector' => '{{WRAPPER}} .aafe-image-sphere__modal-desc', ] ); $this->add_responsive_control( 'desc_margin', [ 'label' => esc_html__( 'Margin', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-desc' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'desc_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-desc' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->end_controls_section(); /* ── STYLE: Close Button ── */ $this->start_controls_section( 'style_close_button', [ 'label' => esc_html__( 'Close Button', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE, ] ); $this->add_control( 'close_icon', [ 'label' => esc_html__( 'Close Icon', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::ICONS, 'default' => [ 'value' => 'fas fa-times', 'library' => 'fa-solid', ], ] ); $this->add_responsive_control( 'close_btn_top', [ 'label' => esc_html__( 'Top Position', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em' ], 'range' => [ 'px' => [ 'min' => -50, 'max' => 100 ] ], 'default' => [ 'size' => 12, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-close' => 'top: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'close_btn_right', [ 'label' => esc_html__( 'Right Position', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em' ], 'range' => [ 'px' => [ 'min' => -50, 'max' => 100 ] ], 'default' => [ 'size' => 12, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-close' => 'right: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'close_icon_size', [ 'label' => esc_html__( 'Icon Size', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-close svg, {{WRAPPER}} .aafe-image-sphere__modal-close i' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}; font-size: {{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'close_btn_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'default' => [ 'top' => '12', 'right' => '12', 'bottom' => '12', 'left' => '12', 'unit' => 'px', 'isLinked' => true, ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-close' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->start_controls_tabs( 'tabs_close_btn_style' ); $this->start_controls_tab( 'tab_close_btn_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'close_btn_color', [ 'label' => esc_html__( 'Icon Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-close' => 'color: {{VALUE}};' ], ] ); $this->add_control( 'close_btn_bg', [ 'label' => esc_html__( 'Background Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-close' => 'background-color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'close_btn_border', 'selector' => '{{WRAPPER}} .aafe-image-sphere__modal-close', ] ); $this->add_control( 'close_btn_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-close' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'close_btn_shadow', 'selector' => '{{WRAPPER}} .aafe-image-sphere__modal-close', ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_close_btn_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ), ] ); $this->add_control( 'close_btn_color_hover', [ 'label' => esc_html__( 'Icon Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-close:hover' => 'color: {{VALUE}};' ], ] ); $this->add_control( 'close_btn_bg_hover', [ 'label' => esc_html__( 'Background Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-close:hover' => 'background-color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'close_btn_border_hover', 'selector' => '{{WRAPPER}} .aafe-image-sphere__modal-close:hover', ] ); $this->add_control( 'close_btn_radius_hover', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .aafe-image-sphere__modal-close:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'close_btn_shadow_hover', 'selector' => '{{WRAPPER}} .aafe-image-sphere__modal-close:hover', ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->end_controls_section(); } protected function render() { $settings = $this->get_settings_for_display(); $container_size = isset( $settings['container_size']['size'] ) ? $settings['container_size']['size'] : 600; $radius = isset( $settings['sphere_radius']['size'] ) ? $settings['sphere_radius']['size'] : 200; $config = [ 'containerSize' => $container_size, 'sphereRadius' => $radius, 'dragSensitivity' => isset( $settings['drag_sensitivity']['size'] ) ? $settings['drag_sensitivity']['size'] : 0.8, 'momentumDecay' => isset( $settings['momentum_decay']['size'] ) ? $settings['momentum_decay']['size'] : 0.96, 'maxRotationSpeed' => isset( $settings['max_rotation_speed']['size'] ) ? $settings['max_rotation_speed']['size'] : 6, 'baseImageScale' => isset( $settings['base_image_scale']['size'] ) ? $settings['base_image_scale']['size'] : 0.15, 'hoverScale' => isset( $settings['hover_scale']['size'] ) ? $settings['hover_scale']['size'] : 1.3, 'autoRotate' => ( $settings['auto_rotate'] === 'yes' ), 'autoRotateSpeed' => isset( $settings['auto_rotate_speed']['size'] ) ? $settings['auto_rotate_speed']['size'] : 0.2, ]; // Duplicate images to fill target node count $images = $settings['images_list']; $target_count = ! empty( $settings['target_node_count'] ) ? intval( $settings['target_node_count'] ) : count( $images ); if ( $target_count > 0 && count( $images ) > 0 && count( $images ) < $target_count ) { $original_images = $images; while ( count( $images ) < $target_count ) { $images = array_merge( $images, $original_images ); } $images = array_slice( $images, 0, $target_count ); } if ( empty( $images ) ) { echo '