[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-0' - loleaflet/src
Pranav Kant
pranavk at collabora.co.uk
Wed Oct 19 17:24:15 UTC 2016
loleaflet/src/layer/tile/TileLayer.js | 24 ------------------------
1 file changed, 24 deletions(-)
New commits:
commit a36440dda36bf62afb1a8daa215a32fb6dd4af92
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Wed Oct 19 22:52:23 2016 +0530
bccu#2055: Dont follow the cursor/cell anymore
Change-Id: If21466595efdf04bb54f6d02b0f54321bd5004aa
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index c53d73b..107c97c 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -885,19 +885,6 @@ L.TileLayer = L.GridLayer.extend({
var pixBounds = L.bounds(this._map.latLngToLayerPoint(this._visibleCursor.getSouthWest()),
this._map.latLngToLayerPoint(this._visibleCursor.getNorthEast()));
var cursorPos = this._visibleCursor.getNorthWest();
-
- if (!e && !this._map.getBounds().contains(this._visibleCursor) && this._isCursorVisible) {
- var center = this._map.project(cursorPos);
- center = center.subtract(this._map.getSize().divideBy(2));
- center.x = Math.round(center.x < 0 ? 0 : center.x);
- center.y = Math.round(center.y < 0 ? 0 : center.y);
-
- if (!(this._selectionHandles.start && this._selectionHandles.start.isDragged) &&
- !(this._selectionHandles.end && this._selectionHandles.end.isDragged)) {
- this._map.fire('scrollto', {x: center.x, y: center.y});
- }
- }
-
if (this._map._permission === 'edit' && this._isCursorVisible && this._isCursorOverlayVisible
&& !this._isEmptyRectangle(this._visibleCursor)) {
if (this._cursorMarker) {
@@ -1029,17 +1016,6 @@ L.TileLayer = L.GridLayer.extend({
} else if (verticalDirection === -1 && this._cellCursor.getSouth() < mapBounds.getSouth()) {
scrollY = this._cellCursor.getSouth() - mapBounds.getSouth() - spacingY;
}
-
- if (scrollX !== 0 || scrollY !== 0) {
- var newCenter = mapBounds.getCenter();
- newCenter.lng += scrollX;
- newCenter.lat += scrollY;
- var center = this._map.project(newCenter);
- center = center.subtract(this._map.getSize().divideBy(2));
- center.x = Math.round(center.x < 0 ? 0 : center.x);
- center.y = Math.round(center.y < 0 ? 0 : center.y);
- this._map.fire('scrollto', {x: center.x, y: center.y});
- }
}
if (this._cellCursorMarker) {
More information about the Libreoffice-commits
mailing list