move marker extensions to Marker.js
This commit is contained in:
parent
7ec434e505
commit
e3545bc9b9
@ -71,8 +71,7 @@ var deps = {
|
||||
src: [
|
||||
'layer/DivOverlay.js',
|
||||
'layer/Popup.js',
|
||||
'layer/Layer.Popup.js',
|
||||
'layer/marker/Marker.Popup.js'
|
||||
'layer/Layer.Popup.js'
|
||||
],
|
||||
deps: ['Marker'],
|
||||
desc: 'Used to display the map popup (used mostly for binding HTML data to markers and paths on click).'
|
||||
@ -81,8 +80,7 @@ var deps = {
|
||||
Tooltip: {
|
||||
src: [
|
||||
'layer/Tooltip.js',
|
||||
'layer/Layer.Tooltip.js',
|
||||
'layer/marker/Marker.Tooltip.js'
|
||||
'layer/Layer.Tooltip.js'
|
||||
],
|
||||
deps: ['Popup', 'Marker'],
|
||||
desc: 'Used to display the map tooltip (used mostly for binding short descriptions to markers and paths on mouseover).'
|
||||
|
@ -1,9 +0,0 @@
|
||||
/*
|
||||
* Popup extension to L.Marker, adding popup-related methods.
|
||||
*/
|
||||
|
||||
L.Marker.include({
|
||||
_getPopupAnchor: function () {
|
||||
return this.options.icon.options.popupAnchor || [0, 0];
|
||||
}
|
||||
});
|
@ -1,9 +0,0 @@
|
||||
/*
|
||||
* Tooltip extension to L.Marker, adding tooltip-related methods.
|
||||
*/
|
||||
|
||||
L.Marker.include({
|
||||
_getTooltipAnchor: function () {
|
||||
return this.options.icon.options.tooltipAnchor || [0, 0];
|
||||
}
|
||||
});
|
@ -320,6 +320,14 @@ L.Marker = L.Layer.extend({
|
||||
|
||||
_resetZIndex: function () {
|
||||
this._updateZIndex(0);
|
||||
},
|
||||
|
||||
_getPopupAnchor: function () {
|
||||
return this.options.icon.options.popupAnchor || [0, 0];
|
||||
},
|
||||
|
||||
_getTooltipAnchor: function () {
|
||||
return this.options.icon.options.tooltipAnchor || [0, 0];
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user