X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/7d92ec704786c2d887e1946f25746d6d70ee7ea8..c3e2e6462f293596aef5d5de18b0a173edc046c7:/vendor/assets/leaflet/leaflet.locationfilter.js diff --git a/vendor/assets/leaflet/leaflet.locationfilter.js b/vendor/assets/leaflet/leaflet.locationfilter.js index 8e5121f62..d120adc30 100644 --- a/vendor/assets/leaflet/leaflet.locationfilter.js +++ b/vendor/assets/leaflet/leaflet.locationfilter.js @@ -100,7 +100,8 @@ L.LocationFilter = L.Class.extend({ }, adjustButton: { text: "Select area within current zoom" - } + }, + buttonPosition: 'topleft' }, initialize: function(options) { @@ -114,7 +115,6 @@ L.LocationFilter = L.Class.extend({ onAdd: function(map) { this._map = map; - this._layer = new L.LayerGroup(); if (this.options.enableButton || this.options.adjustButton) { this._initializeButtonContainer(); @@ -285,6 +285,8 @@ L.LocationFilter = L.Class.extend({ return; } + this._layer = new L.LayerGroup(); + // Calculate filter bounds this._calculateBounds(); @@ -294,7 +296,7 @@ L.LocationFilter = L.Class.extend({ this._eastRect = this._drawRectangle(this._eastBounds); this._southRect = this._drawRectangle(this._southBounds); this._innerRect = this._drawRectangle(this.getBounds(), { - fillColor: "transparent", + fillOpacity: 0, stroke: true, color: "white", weight: 1, @@ -467,7 +469,10 @@ L.LocationFilter = L.Class.extend({ toggles the location filter */ _initializeButtonContainer: function() { var that = this; - this._buttonContainer = new L.Control.ButtonContainer({className: "location-filter button-container"}); + this._buttonContainer = new L.Control.ButtonContainer({ + className: "location-filter button-container", + position: this.options.buttonPosition + }); if (this.options.enableButton) { this._enableButton = new L.Control.Button({