Plugin Directory

Changeset 2384642


Ignore:
Timestamp:
09/18/2020 06:48:57 PM (5 years ago)
Author:
intelchip
Message:

Added more styling controls for markers. Fixed issue where button could not show up if description wasn't added

Location:
osm-map-elementor/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • osm-map-elementor/trunk/osm-map-elementor.php

    r2377533 r2384642  
    55 * Author:          ACT Innovate, James Arama, Alex Hooten
    66 * Author URI:      https://github.com/flopperj/elementor-osm-map
    7  * Version:         1.0.0
     7 * Version:         1.0.2
    88 */
    99
  • osm-map-elementor/trunk/osm-map.php

    r2377533 r2384642  
    470470            ]
    471471        );
     472        $this->add_responsive_control(
     473            'content_align',
     474            [
     475                'label' => __('Alignment', self::$slug),
     476                'type' => \Elementor\Controls_Manager::CHOOSE,
     477                'options' => [
     478                    'left' => [
     479                        'title' => __('Left', self::$slug),
     480                        'icon' => 'eicon-text-align-left',
     481                    ],
     482                    'center' => [
     483                        'title' => __('Center', self::$slug),
     484                        'icon' => 'eicon-text-align-center',
     485                    ],
     486                    'right' => [
     487                        'title' => __('Right', self::$slug),
     488                        'icon' => 'eicon-text-align-right',
     489                    ],
     490                    'justify' => [
     491                        'title' => __('Justified', self::$slug),
     492                        'icon' => 'eicon-text-align-justify',
     493                    ],
     494                ],
     495                'selectors' => [
     496                    '{{WRAPPER}} .marker-content .marker-description' => 'text-align: {{VALUE}};',
     497                ],
     498            ]
     499        );
     500
     501        $this->add_control(
     502            'content_text_color',
     503            [
     504                'label' => __('Text Color', self::$slug),
     505                'type' => \Elementor\Controls_Manager::COLOR,
     506                'default' => '',
     507                'selectors' => [
     508                    '{{WRAPPER}} .marker-content .marker-description' => 'color: {{VALUE}};',
     509                ],
     510                'global' => [
     511                    'default' => Global_Colors::COLOR_TEXT,
     512                ],
     513            ]
     514        );
    472515
    473516        $this->add_group_control(
     
    477520                'label' => __('Typography', self::$slug),
    478521                'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
    479                 'selector' => '{{WRAPPER}} .marker-content',
     522                'selector' => '{{WRAPPER}} .marker-content .marker-description',
    480523            ]
    481524        );
     
    493536        );
    494537
     538        $this->add_responsive_control(
     539            'button_align',
     540            [
     541                'label' => __('Alignment', self::$slug),
     542                'type' => \Elementor\Controls_Manager::CHOOSE,
     543                'options' => [
     544                    'left' => [
     545                        'title' => __('Left', self::$slug),
     546                        'icon' => 'eicon-text-align-left',
     547                    ],
     548                    'center' => [
     549                        'title' => __('Center', self::$slug),
     550                        'icon' => 'eicon-text-align-center',
     551                    ],
     552                    'right' => [
     553                        'title' => __('Right', self::$slug),
     554                        'icon' => 'eicon-text-align-right',
     555                    ]
     556                ],
     557                'selectors' => [
     558                    '{{WRAPPER}} .marker-content .marker-button' => 'text-align: {{VALUE}};',
     559                ],
     560            ]
     561        );
     562
    495563        $this->add_group_control(
    496564            \Elementor\Group_Control_Typography::get_type(),
    497565            [
    498                 'name' => 'typography',
     566                'name' => 'button_typography',
    499567                'global' => [
    500568                    'default' => Global_Typography::TYPOGRAPHY_ACCENT,
     
    507575            \Elementor\Group_Control_Text_Shadow::get_type(),
    508576            [
    509                 'name' => 'text_shadow',
     577                'name' => 'button_text_shadow',
    510578                'selector' => '{{WRAPPER}} .elementor-button',
    511579            ]
     
    753821                        tooltipContent = `<div class="marker-tooltip"><div class="marker-title">${this.marker.marker_title}</div></div>`;
    754822                    } else if (this.marker.marker_description && this.marker.show_button !== 'yes') {
    755                         tooltipContent = `<div class="marker-tooltip"><div class="marker-title">${this.marker.marker_title}</div><div class="marker-content">${this.marker.marker_description}</div></div>`;
     823                        tooltipContent = `<div class="marker-tooltip"><div class="marker-title">${this.marker.marker_title}</div><div class="marker-content"><div class="marker-description">${this.marker.marker_description}</div></div></div>`;
     824                    } else if (this.marker.show_button === 'yes' && !this.marker.marker_description) {
     825                        tooltipContent = `<div class="marker-tooltip"><div class="marker-title">${this.marker.marker_title}</div><div class="marker-content"><div class="marker-button"><a class="elementor-button" target="_blank" href='${this.marker.button_url}'>${this.marker.button_text}</a></div></div></div>`;
    756826                    } else if (this.marker.show_button === 'yes') {
    757                         tooltipContent = `<div class="marker-tooltip"><div class="marker-title">${this.marker.marker_title}</div><div class="marker-content">${this.marker.marker_description}<br /><a class="elementor-button" target="_blank" href='${this.marker.button_url}'>${this.marker.button_text}</a></div></div>`;
     827                        tooltipContent = `<div class="marker-tooltip"><div class="marker-title">${this.marker.marker_title}</div><div class="marker-content"><div class="marker-description">${this.marker.marker_description}</div><div class="marker-button"><a class="elementor-button" target="_blank" href='${this.marker.button_url}'>${this.marker.button_text}</a></div></div></div>`;
    758828                    }
    759829
  • osm-map-elementor/trunk/readme.txt

    r2377533 r2384642  
    11=== OSM Map Widget for Elementor ===
    22Plugin Name: OSM Map Widget for Elementor
    3 Version: 1.0.1
     3Version: 1.0.2
    44Author: ACT Innovate, James Arama, Alex Hooten
    55Author URI: https://github.com/flopperj/osm-map-elementor
Note: See TracChangeset for help on using the changeset viewer.