loleaflet/src/map/Map.js |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9ee08676cc69f7f381f3c9b66bd33903998dfba8
Author:     Dennis Francis <dennis.fran...@collabora.com>
AuthorDate: Fri Aug 7 16:42:30 2020 +0530
Commit:     Dennis Francis <dennis.fran...@collabora.com>
CommitDate: Wed Aug 12 10:19:43 2020 +0200

    loleaflet: do not modify the input L.Point...
    
    in containerPointToLayerPoint() and layerPointToContainerPoint() and
    hence avoid its side-effects.
    
    Note: L.point() does not copy-construct if the argument is already a
    L.Point, so we need to call .clone()
    
    This fixes unwanted scrolling of the map when drag-selecting cells.
    
    Change-Id: If59852fa448c662b11a96d8b5681c59b673403b7
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100481
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Tested-by: Jenkins
    Reviewed-by: Dennis Francis <dennis.fran...@collabora.com>

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 13d62dcdd..283b6bbfd 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -913,7 +913,7 @@ L.Map = L.Evented.extend({
                var splitPos = splitPanesContext.getSplitPos();
                var pixelOrigin = this.getPixelOrigin();
                var mapPanePos = this._getMapPanePos();
-               var result = L.point(point);
+               var result = L.point(point).clone();
                if (point.x <= splitPos.x) {
                        result.x -= pixelOrigin.x;
                }
@@ -944,7 +944,7 @@ L.Map = L.Evented.extend({
                var splitPos = splitPanesContext.getSplitPos();
                var pixelOrigin = this.getPixelOrigin();
                var mapPanePos = this._getMapPanePos();
-               var result = L.point(point)._add(pixelOrigin);
+               var result = L.point(point).add(pixelOrigin);
 
                if (result.x > splitPos.x) {
                        result.x -= (pixelOrigin.x - mapPanePos.x);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to