nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit 6df701e5eaa7e219347377d3b2b86ab2a1756ace
parent 94072752e508efd83cb51ab2c106dfc0ada2536e
Author: Sergej Orlov <wladimirych@gmail.com>
Date:   Tue,  7 Feb 2017 11:07:40 +0300

[panoramas] mouse cursor pointer while panramas layer on

Diffstat:
Msrc/lib/leaflet.control.panoramas/index.js | 4+++-
Msrc/lib/leaflet.control.panoramas/style.css | 3+++
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/lib/leaflet.control.panoramas/index.js b/src/lib/leaflet.control.panoramas/index.js @@ -20,7 +20,7 @@ L.Control.Panoramas = L.Control.extend({ html: '<div class="leaflet-panorama-marker"></div>' } ); - this.marker = L.marker([0, 0], {icon: icon}); + this.marker = L.marker([0, 0], {icon: icon, interactive: false}); }, onAdd: function(map) { @@ -77,6 +77,7 @@ L.Control.Panoramas = L.Control.extend({ return; } L.DomUtil.addClass(this.getContainer(), 'enabled'); + L.DomUtil.addClass(this._map._container, 'panoramas-control-active'); this._coverageLayer.addTo(this._map); this._map.on('click', this.onMapClick, this); this.coverageVisible = true; @@ -118,6 +119,7 @@ L.Control.Panoramas = L.Control.extend({ return; } L.DomUtil.removeClass(this.getContainer(), 'enabled'); + L.DomUtil.removeClass(this._map._container, 'panoramas-control-active'); this._coverageLayer.removeFrom(this._map); this._map.off('click', this.onMapClick, this); this.coverageVisible = false; diff --git a/src/lib/leaflet.control.panoramas/style.css b/src/lib/leaflet.control.panoramas/style.css @@ -19,5 +19,8 @@ margin-left: -17px; margin-top: -17px; /*transform-origin: 17px 17px;*/ +} +.panoramas-control-active { + cursor: pointer; } \ No newline at end of file