[Libreoffice-commits] online.git: loleaflet/src

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 23 08:45:48 UTC 2019


 loleaflet/src/layer/vector/Path.Drag.js |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit b4cec8334c86de53cc08d7668b0d6a0ad92db6ba
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Jul 31 18:53:54 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Sep 23 10:45:30 2019 +0200

    Guard against uncaught exception
    
    (Not sure whether needed in this branch, I saw the uncaught exception
    over in collabora-online-4 quite some time ago, but can't hurt, right?)
    
    Change-Id: Ibaaffdaefd6f034838f0b21c834c1549c3dccbc9
    Reviewed-on: https://gerrit.libreoffice.org/76760
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/79386

diff --git a/loleaflet/src/layer/vector/Path.Drag.js b/loleaflet/src/layer/vector/Path.Drag.js
index 60e105388..688278d2d 100644
--- a/loleaflet/src/layer/vector/Path.Drag.js
+++ b/loleaflet/src/layer/vector/Path.Drag.js
@@ -109,6 +109,9 @@ L.Handler.PathDrag = L.Handler.extend(/** @lends  L.Path.Drag.prototype */ {
 	_onDragStart: function(evt) {
 		var eventType = evt.originalEvent._simulated ? 'touchstart' : evt.originalEvent.type;
 
+		if (!MOVE[eventType])
+			return;
+
 		this._mouseDown = evt.originalEvent;
 		this._mapDraggingWasEnabled = false;
 		this._startPoint = evt.containerPoint.clone();


More information about the Libreoffice-commits mailing list