Created
March 18, 2015 08:07
-
-
Save jaybo/2d2b64e67f9bb71d5e47 to your computer and use it in GitHub Desktop.
Leaflet: _initPathRoot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_initPathRoot: function () { | |
if (!this._pathRoot) { | |
this._pathRoot = L.Path.prototype._createElement('svg'); | |
this._panes.overlayPane.appendChild(this._pathRoot); | |
if (this.options.zoomAnimation && L.Browser.any3d) { | |
L.DomUtil.addClass(this._pathRoot, 'leaflet-zoom-animated'); | |
this.on({ | |
'zoomanim': this._animatePathZoom, | |
'zoomend': this._endPathZoom | |
}); | |
} else { | |
L.DomUtil.addClass(this._pathRoot, 'leaflet-zoom-hide'); | |
} | |
this.on('moveend', this._updateSvgViewport); | |
this._updateSvgViewport(); | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment