update third libs
This commit is contained in:
0
views/third/leaflet-easybutton/easy-button.css
Executable file → Normal file
0
views/third/leaflet-easybutton/easy-button.css
Executable file → Normal file
40
views/third/leaflet-easybutton/easy-button.js
Executable file → Normal file
40
views/third/leaflet-easybutton/easy-button.js
Executable file → Normal file
@@ -169,12 +169,10 @@ L.Control.EasyButton = L.Control.extend({
|
||||
|
||||
this.button = L.DomUtil.create(this.options.tagName, '');
|
||||
|
||||
// the next three if statements should be collapsed into the options
|
||||
// when it's time for breaking changes.
|
||||
if (this.tagName === 'button') {
|
||||
this.button.type = 'button';
|
||||
if (this.options.tagName === 'button') {
|
||||
this.button.setAttribute('type', 'button');
|
||||
}
|
||||
|
||||
|
||||
if (this.options.id ){
|
||||
this.button.id = this.options.id;
|
||||
}
|
||||
@@ -186,12 +184,13 @@ L.Control.EasyButton = L.Control.extend({
|
||||
// don't let double clicks and mousedown get to the map
|
||||
L.DomEvent.addListener(this.button, 'dblclick', L.DomEvent.stop);
|
||||
L.DomEvent.addListener(this.button, 'mousedown', L.DomEvent.stop);
|
||||
L.DomEvent.addListener(this.button, 'mouseup', L.DomEvent.stop);
|
||||
|
||||
// take care of normal clicks
|
||||
L.DomEvent.addListener(this.button,'click', function(e){
|
||||
L.DomEvent.stop(e);
|
||||
this._currentState.onClick(this, this._map ? this._map : null );
|
||||
this._map.getContainer().focus();
|
||||
this._map && this._map.getContainer().focus();
|
||||
}, this);
|
||||
|
||||
// prep the contents of the control
|
||||
@@ -279,8 +278,6 @@ L.Control.EasyButton = L.Control.extend({
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
enable: function(){
|
||||
L.DomUtil.addClass(this.button, 'enabled');
|
||||
L.DomUtil.removeClass(this.button, 'disabled');
|
||||
@@ -288,8 +285,6 @@ L.Control.EasyButton = L.Control.extend({
|
||||
return this;
|
||||
},
|
||||
|
||||
|
||||
|
||||
disable: function(){
|
||||
L.DomUtil.addClass(this.button, 'disabled');
|
||||
L.DomUtil.removeClass(this.button, 'enabled');
|
||||
@@ -297,24 +292,21 @@ L.Control.EasyButton = L.Control.extend({
|
||||
return this;
|
||||
},
|
||||
|
||||
|
||||
removeFrom: function (map) {
|
||||
|
||||
this._container.parentNode.removeChild(this._container);
|
||||
this._map = null;
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
onAdd: function(){
|
||||
var containerObj = L.easyBar([this], {
|
||||
onAdd: function(map){
|
||||
var bar = L.easyBar([this], {
|
||||
position: this.options.position,
|
||||
leafletClasses: this.options.leafletClasses
|
||||
});
|
||||
this._container = containerObj.container;
|
||||
return this._container;
|
||||
}
|
||||
this._anonymousBar = bar;
|
||||
this._container = bar.container;
|
||||
return this._anonymousBar.container;
|
||||
},
|
||||
|
||||
removeFrom: function (map) {
|
||||
if (this._map === map)
|
||||
this.remove();
|
||||
return this;
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user