Plugin Directory

Changeset 2418233


Ignore:
Timestamp:
11/13/2020 08:30:09 PM (5 years ago)
Author:
intelchip
Message:

Added better default styling for map markers

Location:
osm-map-elementor
Files:
34 added
2 edited

Legend:

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

    r2384677 r2418233  
    432432                'type' => \Elementor\Controls_Manager::COLOR,
    433433                'global' => [
    434                     'default' => Global_Colors::COLOR_PRIMARY,
    435                 ],
    436                 'selectors' => [
    437                     '{{WRAPPER}} .marker-title' => 'color: {{VALUE}};',
     434                    'default' => Global_Colors::COLOR_SECONDARY,
     435                ],
     436                'selectors' => [
     437                    '{{WRAPPER}} .marker-title .elementor-heading-title' => 'color: {{VALUE}};',
    438438                ],
    439439            ]
     
    443443            \Elementor\Group_Control_Typography::get_type(),
    444444            [
    445                 'name' => 'typography',
     445                'name' => 'title_typography',
    446446                'global' => [
    447447                    'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
    448448                ],
    449                 'selector' => '{{WRAPPER}} .marker-title',
     449                'selector' => '{{WRAPPER}} .marker-title .elementor-heading-title',
    450450            ]
    451451        );
     
    454454            \Elementor\Group_Control_Text_Shadow::get_type(),
    455455            [
    456                 'name' => 'text_shadow',
    457                 'selector' => '{{WRAPPER}} .marker-title',
     456                'name' => 'title_text_shadow',
     457                'selector' => '{{WRAPPER}} .marker-title .elementor-heading-title',
     458            ]
     459        );
     460
     461        $this->add_responsive_control(
     462            'title_padding',
     463            [
     464                'label' => __('Padding', self::$slug),
     465                'type' => \Elementor\Controls_Manager::DIMENSIONS,
     466                'size_units' => ['px', 'em', '%'],
     467                'selectors' => [
     468                    '{{WRAPPER}} .marker-title .elementor-heading-title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
     469                ],
     470                'separator' => 'before',
     471            ]
     472        );
     473
     474        $this->add_responsive_control(
     475            'title_margin',
     476            [
     477                'label' => __('Margin', self::$slug),
     478                'type' => \Elementor\Controls_Manager::DIMENSIONS,
     479                'size_units' => ['px', 'em', '%'],
     480                'default' => [
     481                    'top' => 0,
     482                    'right' => 0,
     483                    'bottom' => 0,
     484                    'left' => 0,
     485                    'unit' => 'px'
     486                ],
     487                'selectors' => [
     488                    '{{WRAPPER}} .marker-title .elementor-heading-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
     489                ],
     490                'separator' => 'before',
    458491            ]
    459492        );
     
    504537                'label' => __('Text Color', self::$slug),
    505538                'type' => \Elementor\Controls_Manager::COLOR,
    506                 'default' => '',
    507539                'selectors' => [
    508540                    '{{WRAPPER}} .marker-content .marker-description' => 'color: {{VALUE}};',
     
    594626                'label' => __('Text Color', self::$slug),
    595627                'type' => \Elementor\Controls_Manager::COLOR,
    596                 'default' => '',
     628                'global' => [
     629                    'default' => Global_Colors::COLOR_SECONDARY
     630                ],
    597631                'selectors' => [
    598632                    '{{WRAPPER}} .elementor-button' => 'fill: {{VALUE}}; color: {{VALUE}};',
     
    602636
    603637        $this->add_control(
    604             'background_color',
     638            'button_background_color',
    605639            [
    606640                'label' => __('Background Color', self::$slug),
    607641                'type' => \Elementor\Controls_Manager::COLOR,
    608642                'global' => [
    609                     'default' => Global_Colors::COLOR_ACCENT,
     643                    'default' => Global_Colors::COLOR_PRIMARY,
    610644                ],
    611645                'selectors' => [
     
    625659
    626660        $this->add_control(
    627             'hover_color',
     661            'button_hover_color',
    628662            [
    629663                'label' => __('Text Color', self::$slug),
     
    662696
    663697        $this->add_control(
    664             'hover_animation',
     698            'button_hover_animation',
    665699            [
    666700                'label' => __('Hover Animation', self::$slug),
     
    676710            \Elementor\Group_Control_Border::get_type(),
    677711            [
    678                 'name' => 'border',
     712                'name' => 'button_border',
    679713                'selector' => '{{WRAPPER}} .elementor-button',
    680714                'separator' => 'before',
     
    683717
    684718        $this->add_control(
    685             'border_radius',
     719            'button_border_radius',
    686720            [
    687721                'label' => __('Border Radius', self::$slug),
     
    703737
    704738        $this->add_responsive_control(
    705             'text_padding',
     739            'button_text_padding',
    706740            [
    707741                'label' => __('Padding', self::$slug),
     
    821855                    // add marker title
    822856                    if (this.marker.marker_title) {
    823                         tooltipContent += `<div class="marker-title">${this.marker.marker_title}</div>`;
     857                        tooltipContent += `<div class="marker-title"><h5 class="elementor-heading-title elementor-size-default">${this.marker.marker_title}</h5></div>`;
    824858                    }
    825859
     
    834868                    // add marker button
    835869                    if (this.marker.show_button === 'yes' && this.marker.button_text) {
    836                         tooltipContent += `<div class="marker-button"><a class="elementor-button" target="_blank" href='${this.marker.button_url}'>${this.marker.button_text}</a></div>`;
     870                        tooltipContent += `<div class="marker-button">
     871                                                <a class="elementor-button elementor-button-link" target="_blank" href='${this.marker.button_url}' role="button">
     872                                                    <span class="elementor-button-content-wrapper">
     873                                                        <span class="elementor-button-text">
     874                                                            ${this.marker.button_text}
     875                                                        </span>
     876                                                    </span>
     877                                                </a>
     878                                            </div>`;
    837879                    }
    838880
  • osm-map-elementor/trunk/readme.txt

    r2384663 r2418233  
    11=== OSM Map Widget for Elementor ===
    22Plugin Name: OSM Map Widget for Elementor
    3 Version: 1.0.2
     3Version: 1.0.3
    44Author: ACT Innovate, James Arama, Alex Hooten
    55Author URI: https://github.com/flopperj/osm-map-elementor
     
    88Tested up to: 5.5.1
    99Requires PHP: 5.6
    10 Stable tag: 1.0.1
     10Stable tag: 1.0.3
    1111License: GPLv3
    1212License URI: https://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset for help on using the changeset viewer.