update build

This commit is contained in:
Vladimir Agafonkin 2012-12-10 18:07:02 +02:00
parent 236b8fbbf0
commit 18601ddfde
3 changed files with 13 additions and 14 deletions

View File

@ -14,7 +14,7 @@
</head> </head>
<body> <body>
<div id="map"></div> <div id="map" style="border: 50px solid #f00"></div>
<button id="populate">Populate with 10 markers</button> <button id="populate">Populate with 10 markers</button>
<script type="text/javascript"> <script type="text/javascript">

23
dist/leaflet-src.js vendored
View File

@ -716,6 +716,11 @@ L.DomUtil = {
do { do {
top += el.offsetTop || 0; top += el.offsetTop || 0;
left += el.offsetLeft || 0; left += el.offsetLeft || 0;
//add borders
top += parseInt(L.DomUtil.getStyle(el, "borderTopWidth"), 10) || 0;
left += parseInt(L.DomUtil.getStyle(el, "borderLeftWidth"), 10) || 0;
pos = L.DomUtil.getStyle(el, 'position'); pos = L.DomUtil.getStyle(el, 'position');
if (el.offsetParent === docBody && pos === 'absolute') { break; } if (el.offsetParent === docBody && pos === 'absolute') { break; }
@ -787,7 +792,7 @@ L.DomUtil = {
}, },
enableTextSelection: function () { enableTextSelection: function () {
if (document.onselectstart === L.Util.falseFn) { if (document.onselectstart === L.Util.falseFn && this._onselectstart) {
document.onselectstart = this._onselectstart; document.onselectstart = this._onselectstart;
this._onselectstart = null; this._onselectstart = null;
} }
@ -1655,7 +1660,6 @@ L.Map = L.Class.extend({
_initLayout: function () { _initLayout: function () {
var container = this._container; var container = this._container;
container.innerHTML = '';
L.DomUtil.addClass(container, 'leaflet-container'); L.DomUtil.addClass(container, 'leaflet-container');
if (L.Browser.touch) { if (L.Browser.touch) {
@ -4397,16 +4401,12 @@ L.Path = (L.Path.SVG && !window.L_PREFER_CANVAS) || !L.Browser.canvas ? L.Path :
this._updateStyle(); this._updateStyle();
if (options.fill) { if (options.fill) {
if (options.fillOpacity < 1) { ctx.globalAlpha = options.fillOpacity;
ctx.globalAlpha = options.fillOpacity;
}
ctx.fill(); ctx.fill();
} }
if (options.stroke) { if (options.stroke) {
if (options.opacity < 1) { ctx.globalAlpha = options.opacity;
ctx.globalAlpha = options.opacity;
}
ctx.stroke(); ctx.stroke();
} }
@ -5074,8 +5074,7 @@ L.Rectangle = L.Polygon.extend({
latLngBounds.getSouthWest(), latLngBounds.getSouthWest(),
latLngBounds.getNorthWest(), latLngBounds.getNorthWest(),
latLngBounds.getNorthEast(), latLngBounds.getNorthEast(),
latLngBounds.getSouthEast(), latLngBounds.getSouthEast()
latLngBounds.getSouthWest()
]; ];
} }
}); });
@ -8001,11 +8000,11 @@ L.Map.include(!L.DomUtil.TRANSITION ? {} : {
_onZoomTransitionEnd: function () { _onZoomTransitionEnd: function () {
this._restoreTileFront(); this._restoreTileFront();
L.Util.falseFn(this._tileBg.offsetWidth); // force reflow
this._resetView(this._animateToCenter, this._animateToZoom, true, true);
L.DomUtil.removeClass(this._mapPane, 'leaflet-zoom-anim'); L.DomUtil.removeClass(this._mapPane, 'leaflet-zoom-anim');
L.Util.falseFn(this._tileBg.offsetWidth); // force reflow
this._animatingZoom = false; this._animatingZoom = false;
this._resetView(this._animateToCenter, this._animateToZoom, true, true);
if (L.Draggable) { if (L.Draggable) {
L.Draggable._disabled = false; L.Draggable._disabled = false;

2
dist/leaflet.js vendored

File diff suppressed because one or more lines are too long