Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions leaflet-core.html
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,6 @@
domReady: function() {
this.guessLeafletImagePath();
var map = L.map(this.$.map, {
center: [this.latitude, this.longitude],
zoom: this.zoom,
minZoom: this.minZoom,
maxZoom: this.maxZoom,
dragging: !this.noDragging,
Expand All @@ -681,7 +679,7 @@
zoomAnimationThreshold: this.zoomAnimationThreshold
});
this.map = map;

// fire an event for when this.map is defined and ready.
// (needed for components that talk to this.map directly)
this.fire('map-ready');
Expand All @@ -690,7 +688,8 @@
map.on('click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu focus blur preclick load unload viewreset movestart move moveend dragstart drag dragend zoomstart zoomend zoomlevelschange resize autopanstart layeradd layerremove baselayerchange overlayadd overlayremove locationfound locationerror popupopen popupclose', function(e) {
this.fire(e.type, e);
}, this);

// set map view after registering events so viewreset and load events can be caught
map.setView([this.latitude, this.longitude], this.zoom);
// update attributes
map.on('moveend', function(e) {
this._ignoreViewChange = true;
Expand Down