Turn off world copy jump if continuous world is turned on

This commit is contained in:
mourner 2011-10-05 15:41:16 +03:00
parent 3e1f7726f6
commit b078e0236e

View File

@ -13,7 +13,9 @@ L.Handler.MapDrag = L.Handler.extend({
this._draggable.on('drag', this._onDrag, this); this._draggable.on('drag', this._onDrag, this);
this._draggable.on('dragend', this._onDragEnd, this); this._draggable.on('dragend', this._onDragEnd, this);
if (this._map.options.worldCopyJump) { var options = this._map.options;
if (options.worldCopyJump && !options.continuousWorld) {
this._draggable.on('predrag', this._onPreDrag, this); this._draggable.on('predrag', this._onPreDrag, this);
this._map.on('viewreset', this._onViewReset, this); this._map.on('viewreset', this._onViewReset, this);
} }