update build

This commit is contained in:
mourner 2011-03-31 22:59:59 +03:00
parent 8f2bc2c11b
commit 443371379e

6
dist/leaflet.js vendored
View File

@ -80,6 +80,6 @@ _initEvents:function(){L.DomEvent.addListener(this._container,"click",this._onMo
_getNewTopLeftPoint:function(a){var b=this.getSize().divideBy(2,!0);return this.project(a).subtract(b).round()},_limitZoom:function(a){var b=this.getMinZoom(),c=this.getMaxZoom();return Math.max(b,Math.min(c,a))}});L.Map.include({locate:function(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(L.Util.bind(this._handleGeolocationResponse,this),L.Util.bind(this._handleGeolocationError,this));return this},_handleGeolocationError:function(a){this.fire("locationerror",{message:a.message})},_handleGeolocationResponse:function(a){var b=180*a.coords.accuracy/4E7,c=b*2,d=a.coords.latitude,e=a.coords.longitude,f=new L.LatLng(d-b,e-c);b=new L.LatLng(d+b,e+c);f=new L.LatLngBounds(f,b);this.fitBounds(f);
this.fire("locationfound",{latlng:new L.LatLng(d,e),bounds:f,accuracy:a.coords.accuracy})}});L.Map.include({openPopup:function(a){this.closePopup();this._popup=a;this.addLayer(a)},closePopup:function(){this._popup&&this.removeLayer(this._popup)}});L.Map.include(!L.Transition||!L.Transition.implemented()?{}:{setView:function(a,b,c){b=this._limitZoom(b);var d=this._zoom!=b;if(this._loaded&&!c&&this._layers&&(c=this._getNewTopLeftPoint(a).subtract(this._getTopLeftPoint()),d&&this._zoomToIfCenterInView?this._zoomToIfCenterInView(a,b,c):this._panByIfClose(c)))return this;this._resetView(a,b);return this},panBy:function(a){if(!this._panTransition)this._panTransition=new L.Transition(this._mapPane,{duration:0.3}),this._panTransition.on("step",this._onPanTransitionStep,
this),this._panTransition.on("end",this._onPanTransitionEnd,this);this.fire(this,"movestart");this._panTransition.run({position:L.DomUtil.getPosition(this._mapPane).subtract(a)});return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){this.fire("moveend")},_panByIfClose:function(a){if(this._offsetIsWithinView(a))return this.panBy(a),!0;return!1},_offsetIsWithinView:function(a,b){var c=b||1,d=this.getSize();return Math.abs(a.x)<=d.x*c&&Math.abs(a.y)<=d.y*c}});L.Map.include(!L.Transition||!L.Transition.implemented()?{}:{_zoomToIfCenterInView:function(a,b,c){if(this._animatingZoom)return!0;if(!L.Transition.NATIVE)return!1;var d=Math.pow(2,b-this._zoom),e=c.divideBy(1-1/d);if(!this._offsetIsWithinView(e,1))return!1;this._prepareTileBg();this._mapPane.className+=" leaflet-animating";c=L.DomUtil.getPosition(this._mapPane);e=this.containerPointToLayerPoint(this.getSize().divideBy(2)).add(e);c=L.DomUtil.getTranslateString(c);this._runAnimation(a,b,d,c,e);return!0},
_runAnimation:function(a,b,c,d,e){this._animatingZoom=!0;this._resetView(a,b);this._tileBg.style[L.DomUtil.TRANSFORM_PROPERTY]=d;a={};a[L.DomUtil.TRANSFORM_PROPERTY]=d+" "+L.DomUtil.getScaleString(c,e);this._tileBg.transition.run(a)},_prepareTileBg:function(){if(!this._tileBg)this._tileBg=this._createPane("leaflet-tile-pane",this._mapPane),this._tileBg.style.zIndex=1;var a=this._tilePane,b=this._tileBg;b.innerHTML="";b.style[L.DomUtil.TRANSFORM_PROPERTY]="";b.style.visibility="hidden";b.empty=!0;
a.empty=!1;this._tilePane=this._panes.tilePane=b;this._tileBg=a;if(!this._tileBg.transition)this._tileBg.transition=new L.Transition(this._tileBg,{duration:0.25,easing:"cubic-bezier(0.25,0.1,0.25,0.75)"}),this._tileBg.transition.on("end",this._onZoomTransitionEnd,this)},_onZoomTransitionEnd:function(){this._restoreTileFront();this._mapPane.className=this._mapPane.className.replace(" leaflet-animating","");this._animatingZoom=!1},_restoreTileFront:function(){this._tilePane.style.visibility="";this._tilePane.style.zIndex=
2;this._tileBg.style.zIndex=1}});
_runAnimation:function(a,b,c,d,e){this._animatingZoom=!0;this._resetView(a,b);this._tileBg.style[L.DomUtil.TRANSFORM_PROPERTY]=d;L.Util.falseFn(this._tileBg.offsetWidth);a={};a[L.DomUtil.TRANSFORM_PROPERTY]=d+" "+L.DomUtil.getScaleString(c,e);this._tileBg.transition.run(a)},_prepareTileBg:function(){if(!this._tileBg)this._tileBg=this._createPane("leaflet-tile-pane",this._mapPane),this._tileBg.style.zIndex=1;var a=this._tilePane,b=this._tileBg;b.innerHTML="";b.style[L.DomUtil.TRANSFORM_PROPERTY]="";
b.style.visibility="hidden";b.empty=!0;a.empty=!1;this._tilePane=this._panes.tilePane=b;this._tileBg=a;if(!this._tileBg.transition)this._tileBg.transition=new L.Transition(this._tileBg,{duration:0.25,easing:"cubic-bezier(0.25,0.1,0.25,0.75)"}),this._tileBg.transition.on("end",this._onZoomTransitionEnd,this)},_onZoomTransitionEnd:function(){this._restoreTileFront();this._mapPane.className=this._mapPane.className.replace(" leaflet-animating","");this._animatingZoom=!1},_restoreTileFront:function(){this._tilePane.style.visibility=
"";this._tilePane.style.zIndex=2;this._tileBg.style.zIndex=1}});