]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.zoom.js
Reduce es lint moaning
[rails.git] / app / assets / javascripts / leaflet.zoom.js
index 205527432666a3217ffe9a73587d0c949ed3f7f3..e7c048b2d933c568f8eacfa5c7fcd987c85f9f7b 100644 (file)
@@ -1,26 +1,26 @@
 L.OSM.Zoom = L.Control.extend({
        options: {
 L.OSM.Zoom = L.Control.extend({
        options: {
-               position: 'topright'
+               position: "topright"
        },
 
        onAdd: function (map) {
        },
 
        onAdd: function (map) {
-               var zoomName = 'zoom',
-                   container = L.DomUtil.create('div', zoomName);
+               var zoomName = "zoom",
+                   container = L.DomUtil.create("div", zoomName);
 
                this._map = map;
 
 
                this._map = map;
 
-               this._zoomInButton  = this._createButton(
-                       '', I18n.t('javascripts.map.zoom.in'),  zoomName + 'in',  container, this._zoomIn,  this);
+               this._zoomInButton = this._createButton(
+                       "", I18n.t("javascripts.map.zoom.in"), zoomName + "in", container, this._zoomIn, this);
                this._zoomOutButton = this._createButton(
                this._zoomOutButton = this._createButton(
-                       '', I18n.t('javascripts.map.zoom.out'), zoomName + 'out', container, this._zoomOut, this);
+                       "", I18n.t("javascripts.map.zoom.out"), zoomName + "out", container, this._zoomOut, this);
 
 
-               map.on('zoomend zoomlevelschange', this._updateDisabled, this);
+               map.on("zoomend zoomlevelschange", this._updateDisabled, this);
 
                return container;
        },
 
        onRemove: function (map) {
 
                return container;
        },
 
        onRemove: function (map) {
-               map.off('zoomend zoomlevelschange', this._updateDisabled, this);
+               map.off("zoomend zoomlevelschange", this._updateDisabled, this);
        },
 
        _zoomIn: function (e) {
        },
 
        _zoomIn: function (e) {
@@ -32,28 +32,28 @@ L.OSM.Zoom = L.Control.extend({
        },
 
        _createButton: function (html, title, className, container, fn, context) {
        },
 
        _createButton: function (html, title, className, container, fn, context) {
-               var link = L.DomUtil.create('a', 'control-button ' + className, container);
+               var link = L.DomUtil.create("a", "control-button " + className, container);
                link.innerHTML = html;
                link.innerHTML = html;
-               link.href = '#';
+               link.href = "#";
                link.title = title;
 
                link.title = title;
 
-               L.DomUtil.create('span', 'icon ' + className, link);
+               L.DomUtil.create("span", "icon " + className, link);
 
                var stop = L.DomEvent.stopPropagation;
 
                L.DomEvent
 
                var stop = L.DomEvent.stopPropagation;
 
                L.DomEvent
-                   .on(link, 'click', stop)
-                   .on(link, 'mousedown', stop)
-                   .on(link, 'dblclick', stop)
-                   .on(link, 'click', L.DomEvent.preventDefault)
-                   .on(link, 'click', fn, context);
+                   .on(link, "click", stop)
+                   .on(link, "mousedown", stop)
+                   .on(link, "dblclick", stop)
+                   .on(link, "click", L.DomEvent.preventDefault)
+                   .on(link, "click", fn, context);
 
                return link;
        },
 
        _updateDisabled: function () {
                var map = this._map,
 
                return link;
        },
 
        _updateDisabled: function () {
                var map = this._map,
-                       className = 'leaflet-disabled';
+                       className = "disabled";
 
                L.DomUtil.removeClass(this._zoomInButton, className);
                L.DomUtil.removeClass(this._zoomOutButton, className);
 
                L.DomUtil.removeClass(this._zoomInButton, className);
                L.DomUtil.removeClass(this._zoomOutButton, className);