]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/assets/leaflet/leaflet.locationfilter.js
Merge branch 'master' into messages
[rails.git] / vendor / assets / leaflet / leaflet.locationfilter.js
index 9a0af4db4e59bd17215d7ddfd11029eecbaed317..64ca347125c548fd1f381e36b16bef5a9c903d3d 100644 (file)
@@ -90,9 +90,7 @@ L.Control.ButtonContainer = L.Control.extend({
     }
 });
 
-L.LocationFilter = L.Class.extend({
-    includes: L.Mixin.Events,
-
+L.LocationFilter = L.Layer.extend({
     options: {
         enableButton: {
             enableText: "Select area",
@@ -100,7 +98,8 @@ L.LocationFilter = L.Class.extend({
         },
         adjustButton: {
             text: "Select area within current zoom"
-        }
+        },
+        buttonPosition: 'topleft'
     },
 
     initialize: function(options) {
@@ -468,7 +467,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({