First version

This commit is contained in:
LeOSW42
2015-01-27 18:00:59 +01:00
parent bfcf5e638d
commit cb60701513
63 changed files with 21013 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
.leaflet-control-scrollzoom {
text-indent: -999em;
background-image: url(./imgs/wheel.png);
background-position: center center;
background-repeat: no-repeat;
background-size: 16px 16px;
}
.dark .leaflet-control-scrollzoom {
background-image: url(./imgs/wheel-dark.png);
}
.leaflet-control-scrollzoom:focus {
outline: 0;
}
.leaflet-control-scrollzoom.leaflet-disabled {
background-image: url(./imgs/wheel_over.png);
}
.dark .leaflet-control-scrollzoom.leaflet-disabled {
background-image: url(./imgs/wheel_over-dark.png);
}

View File

@@ -0,0 +1,44 @@
L.Control.MouseScroll = L.Control.Zoom.extend({
options: {
position: "topleft",
mouseScrollText: "Zoom Molette",
forceSeparateButton: false,
mouseScrollTitle: "Zoom Molette"
},
onAdd: function (map) {
var scrollZoom = "leaflet-control-scrollzoom"
, container = L.DomUtil.create("div", scrollZoom + " leaflet-bar")
, options = this.options
this._map = map
this._mouseScrollButton = this._createButton(options.mouseScrollText, options.mouseScrollTitle,
scrollZoom, container, this._mouseScroll, this)
this._updateDisabled()
map.on('focus', this._updateDisabled, this)
return container
},
_mouseScroll: function () {
if(this._map.scrollWheelZoom.enabled()) {
this._map.scrollWheelZoom.disable();
}
else {
this._map.scrollWheelZoom.enable();
}
},
_updateDisabled: function () {
var map = this._map
, className = "leaflet-disabled"
L.DomUtil.removeClass(this._mouseScrollButton, className)
if (!map.scrollWheelZoom.enabled()) {
L.DomUtil.addClass(this._mouseScrollButton, className)
}
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B