loleaflet/src/control/Ruler.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
New commits: commit 54461e0e1ada9d2d26a952836b96eb92e336c036 Author: Tomaž Vajngerl <[email protected]> AuthorDate: Mon Apr 20 07:31:55 2020 +0200 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Mon Apr 20 12:44:51 2020 +0200 ruler: only handle left mouse event in the tab-stop area Change-Id: Ifd3fe9f1b532a4dfec250482044bf860caefbd2b Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92547 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Tomaž Vajngerl <[email protected]> diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js index 1d8450a54..3b9e52fb2 100644 --- a/loleaflet/src/control/Ruler.js +++ b/loleaflet/src/control/Ruler.js @@ -388,7 +388,11 @@ L.Control.Ruler = L.Control.extend({ _initiateTabstopDrag: function(event) { // console.log('===> _initiateTabstopDrag ' + event.type); - + if (event.button !== 0) { + event.stopPropagation(); // prevent handling of the mother event elsewhere + return; + } + var tabstopContainer = null; var pointX = null; commit 2e6c2bff23922ef4db771b8c8f4faef045b88b63 Author: Tomaž Vajngerl <[email protected]> AuthorDate: Sun Apr 19 20:14:27 2020 +0200 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Mon Apr 20 12:44:42 2020 +0200 limit tabstop container between left and right ruler margin Otherwise right we can't change right ruler margin as no mouse event goes through. Change-Id: Id2f536ab6cb82908e17e4c293762160e8dd2fb8c Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92546 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Tomaž Vajngerl <[email protected]> diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js index 73dbcb8ac..1d8450a54 100644 --- a/loleaflet/src/control/Ruler.js +++ b/loleaflet/src/control/Ruler.js @@ -255,8 +255,8 @@ L.Control.Ruler = L.Control.extend({ this._rMarginDrag.style.width = (this.options.DraggableConvertRatio*rMargin) + 'px'; // Put the _rTSContainer in the right place - this._rTSContainer.style.marginLeft = (this.options.DraggableConvertRatio * lMargin) + 'px'; - this._rTSContainer.style.width = 'calc(' + this._rFace.style.width + ' - ' + this._rMarginMarker.style.width + ')'; + this._rTSContainer.style.left = (this.options.DraggableConvertRatio * lMargin) + 'px'; + this._rTSContainer.style.right = (this.options.DraggableConvertRatio * rMargin) + 'px'; if (this.options.interactive) { this._changeInteractions({perm:'edit'}); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
