different whitespace fixes (smart tabs, lines no longer than 100)
This commit is contained in:
parent
4080a64adc
commit
a293f52e80
@ -288,7 +288,10 @@ L.Map = L.Class.extend({
|
||||
zoom++;
|
||||
nePoint = this.project(ne, zoom);
|
||||
swPoint = this.project(sw, zoom);
|
||||
boundsSize = new L.Point(Math.abs(nePoint.x - swPoint.x), Math.abs(swPoint.y - nePoint.y));
|
||||
|
||||
boundsSize = new L.Point(
|
||||
Math.abs(nePoint.x - swPoint.x),
|
||||
Math.abs(swPoint.y - nePoint.y));
|
||||
|
||||
if (!inside) {
|
||||
zoomNotFound = boundsSize.x <= size.x && boundsSize.y <= size.y;
|
||||
@ -442,8 +445,7 @@ L.Map = L.Class.extend({
|
||||
this._mapPane = panes.mapPane = this._createPane('leaflet-map-pane', this._container);
|
||||
|
||||
this._tilePane = panes.tilePane = this._createPane('leaflet-tile-pane', this._mapPane);
|
||||
this._objectsPane = panes.objectsPane = this._createPane('leaflet-objects-pane', this._mapPane);
|
||||
|
||||
panes.objectsPane = this._createPane('leaflet-objects-pane', this._mapPane);
|
||||
panes.shadowPane = this._createPane('leaflet-shadow-pane');
|
||||
panes.overlayPane = this._createPane('leaflet-overlay-pane');
|
||||
panes.markerPane = this._createPane('leaflet-marker-pane');
|
||||
@ -459,7 +461,7 @@ L.Map = L.Class.extend({
|
||||
},
|
||||
|
||||
_createPane: function (className, container) {
|
||||
return L.DomUtil.create('div', className, container || this._objectsPane);
|
||||
return L.DomUtil.create('div', className, container || this._panes.objectsPane);
|
||||
},
|
||||
|
||||
_initializers: [],
|
||||
@ -541,7 +543,8 @@ L.Map = L.Class.extend({
|
||||
|
||||
L.DomEvent.on(this._container, 'click', this._onMouseClick, this);
|
||||
|
||||
var events = ['dblclick', 'mousedown', 'mouseup', 'mouseenter', 'mouseleave', 'mousemove', 'contextmenu'],
|
||||
var events = ['dblclick', 'mousedown', 'mouseup', 'mouseenter',
|
||||
'mouseleave', 'mousemove', 'contextmenu'],
|
||||
i, len;
|
||||
|
||||
for (i = 0, len = events.length; i < len; i++) {
|
||||
@ -555,7 +558,8 @@ L.Map = L.Class.extend({
|
||||
|
||||
_onResize: function () {
|
||||
L.Util.cancelAnimFrame(this._resizeRequest);
|
||||
this._resizeRequest = L.Util.requestAnimFrame(this.invalidateSize, this, false, this._container);
|
||||
this._resizeRequest = L.Util.requestAnimFrame(
|
||||
this.invalidateSize, this, false, this._container);
|
||||
},
|
||||
|
||||
_onMouseClick: function (e) {
|
||||
|
@ -18,8 +18,7 @@ L.Map.include({
|
||||
function createCorner(vSide, hSide) {
|
||||
var className = l + vSide + ' ' + l + hSide;
|
||||
|
||||
corners[vSide + hSide] =
|
||||
L.DomUtil.create('div', className, container);
|
||||
corners[vSide + hSide] = L.DomUtil.create('div', className, container);
|
||||
}
|
||||
|
||||
createCorner('top', 'left');
|
||||
|
@ -28,7 +28,8 @@ L.Map.include({
|
||||
onError = L.Util.bind(this._handleGeolocationError, this);
|
||||
|
||||
if (options.watch) {
|
||||
this._locationWatchId = navigator.geolocation.watchPosition(onResponse, onError, options);
|
||||
this._locationWatchId =
|
||||
navigator.geolocation.watchPosition(onResponse, onError, options);
|
||||
} else {
|
||||
navigator.geolocation.getCurrentPosition(onResponse, onError, options);
|
||||
}
|
||||
|
@ -71,9 +71,9 @@ L.Map.BoxZoom = L.Handler.extend({
|
||||
.off(document, 'mouseup', this._onMouseUp);
|
||||
|
||||
var map = this._map,
|
||||
layerPoint = map.mouseEventToLayerPoint(e);
|
||||
layerPoint = map.mouseEventToLayerPoint(e),
|
||||
|
||||
var bounds = new L.LatLngBounds(
|
||||
bounds = new L.LatLngBounds(
|
||||
map.layerPointToLatLng(this._startLayerPoint),
|
||||
map.layerPointToLatLng(layerPoint));
|
||||
|
||||
|
@ -19,9 +19,9 @@ L.Map.mergeOptions({
|
||||
L.Map.Drag = L.Handler.extend({
|
||||
addHooks: function () {
|
||||
if (!this._draggable) {
|
||||
var options = this._map.options;
|
||||
var map = this._map;
|
||||
|
||||
this._draggable = new L.Draggable(this._map._mapPane, this._map._container, options.longPress);
|
||||
this._draggable = new L.Draggable(map._mapPane, map._container, map.options.longPress);
|
||||
|
||||
this._draggable.on({
|
||||
'dragstart': this._onDragStart,
|
||||
@ -29,9 +29,9 @@ L.Map.Drag = L.Handler.extend({
|
||||
'dragend': this._onDragEnd
|
||||
}, this);
|
||||
|
||||
if (options.worldCopyJump) {
|
||||
if (map.options.worldCopyJump) {
|
||||
this._draggable.on('predrag', this._onPreDrag, this);
|
||||
this._map.on('viewreset', this._onViewReset, this);
|
||||
map.on('viewreset', this._onViewReset, this);
|
||||
}
|
||||
}
|
||||
this._draggable.enable();
|
||||
@ -110,7 +110,7 @@ L.Map.Drag = L.Handler.extend({
|
||||
|
||||
noInertia = !options.inertia ||
|
||||
delay > options.inertiaThreshold ||
|
||||
this._positions[0] === undefined;
|
||||
!this._positions[0];
|
||||
|
||||
if (noInertia) {
|
||||
map.fire('moveend');
|
||||
@ -129,9 +129,9 @@ L.Map.Drag = L.Handler.extend({
|
||||
decelerationDuration = limitedSpeed / options.inertiaDeceleration,
|
||||
offset = limitedSpeedVector.multiplyBy(-decelerationDuration / 2).round();
|
||||
|
||||
L.Util.requestAnimFrame(L.Util.bind(function () {
|
||||
this._map.panBy(offset, decelerationDuration);
|
||||
}, this));
|
||||
L.Util.requestAnimFrame(function () {
|
||||
map.panBy(offset, decelerationDuration);
|
||||
});
|
||||
}
|
||||
|
||||
map.fire('dragend');
|
||||
|
@ -45,6 +45,7 @@ L.Map.Keyboard = L.Handler.extend({
|
||||
this._removeHooks();
|
||||
|
||||
var container = this._map._container;
|
||||
|
||||
L.DomEvent
|
||||
.removeListener(container, 'focus', this._onFocus, this)
|
||||
.removeListener(container, 'blur', this._onBlur, this)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* L.Handler.ScrollWheelZoom is used internally by L.Map to enable mouse scroll wheel zooming on the map.
|
||||
* L.Handler.ScrollWheelZoom is used by L.Map to enable mouse scroll wheel zoom on the map.
|
||||
*/
|
||||
|
||||
L.Map.mergeOptions({
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* L.Handler.TouchZoom is used internally by L.Map to add touch-zooming on Webkit-powered mobile browsers.
|
||||
* L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.
|
||||
*/
|
||||
|
||||
L.Map.mergeOptions({
|
||||
@ -68,7 +68,8 @@ L.Map.TouchZoom = L.Handler.extend({
|
||||
}
|
||||
|
||||
L.Util.cancelAnimFrame(this._animRequest);
|
||||
this._animRequest = L.Util.requestAnimFrame(this._updateOnMove, this, true, this._map._container);
|
||||
this._animRequest = L.Util.requestAnimFrame(
|
||||
this._updateOnMove, this, true, this._map._container);
|
||||
|
||||
L.DomEvent.preventDefault(e);
|
||||
},
|
||||
@ -108,7 +109,9 @@ L.Map.TouchZoom = L.Handler.extend({
|
||||
|
||||
oldZoom = map.getZoom(),
|
||||
floatZoomDelta = map.getScaleZoom(this._scale) - oldZoom,
|
||||
roundZoomDelta = (floatZoomDelta > 0 ? Math.ceil(floatZoomDelta) : Math.floor(floatZoomDelta)),
|
||||
roundZoomDelta = (floatZoomDelta > 0 ?
|
||||
Math.ceil(floatZoomDelta) : Math.floor(floatZoomDelta)),
|
||||
|
||||
zoom = map._limitZoom(oldZoom + roundZoomDelta);
|
||||
|
||||
map.fire('zoomanim', {
|
||||
|
Loading…
Reference in New Issue
Block a user