[Libreoffice-commits] online.git: loleaflet/src
Marco Cecchetti
marco.cecchetti at collabora.com
Mon Feb 5 15:48:08 UTC 2018
loleaflet/src/control/Control.Header.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit fec429ecdcb7de36cf65e1aa27d2e233a48a32ec
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date: Fri Feb 2 12:36:24 2018 +0100
loleaflet: calc: double click on resize area freezes header handling
Change-Id: I05d758ed0cb6cafa5ab14418b82f23b607e4ea95
Reviewed-on: https://gerrit.libreoffice.org/49238
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/loleaflet/src/control/Control.Header.js b/loleaflet/src/control/Control.Header.js
index 844e340e..9a97a254 100644
--- a/loleaflet/src/control/Control.Header.js
+++ b/loleaflet/src/control/Control.Header.js
@@ -396,6 +396,10 @@ L.Control.Header = L.Control.extend({
if (!this._hitResizeArea)
return;
+ var rect = this.getHeaderEntryBoundingClientRect();
+ if (!rect)
+ return;
+
L.DomUtil.disableImageDrag();
L.DomUtil.disableTextSelection();
@@ -408,7 +412,7 @@ L.Control.Header = L.Control.extend({
L.DomEvent.on(document, 'mousemove', this._onMouseMoveForDragging, this);
L.DomEvent.on(document, 'mouseup', this._onMouseUp, this);
- var rect = this.getHeaderEntryBoundingClientRect();
+
this._start = new L.Point(rect.left, rect.top);
this._offset = new L.Point(rect.right - e.clientX, rect.bottom - e.clientY);
this._item = target;
More information about the Libreoffice-commits
mailing list