[Libreoffice-commits] online.git: loleaflet/src
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Tue Feb 4 14:02:13 UTC 2020
loleaflet/src/control/Ruler.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 15bad57fc9a9dccabca1bdec9760603e7501d3c3
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Feb 4 15:28:38 2020 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Tue Feb 4 15:01:53 2020 +0100
tdf#128468: Do actually pass the Amount parameter of MoveTabstop in twips
Also some (commented-out) logging improvement.
Change-Id: I1d667f30c780d06e1bf4e7ad8ea6cda6ecbb2adf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87973
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js
index a01a8d395..c190039cc 100644
--- a/loleaflet/src/control/Ruler.js
+++ b/loleaflet/src/control/Ruler.js
@@ -348,12 +348,13 @@ L.Control.Ruler = L.Control.extend({
},
_moveTabstop: function(e) {
- var diff = this._map._docLayer._pixelsToTwips({x: e.layerX - e.currentTarget.tabStopPrevPos, y:0}).x;
+ var pixelDiff = e.layerX - e.currentTarget.tabStopPrevPos;
+ var diff = this._map._docLayer._pixelsToTwips({x: pixelDiff, y:0}).x;
if (diff === 0)
return;
- // console.log('===> _moveTabstop ' + e.currentTarget.tabStopBeingDragged + ' ' + diff);
- this._map.sendUnoCommand('.uno:MoveTabstop?Tabstop=' + e.currentTarget.tabStopBeingDragged + '&Amount=' + (e.layerX - e.currentTarget.tabStopPrevPos));
+ // console.log('===> _moveTabstop ' + e.currentTarget.tabStopBeingDragged + ' pixels:' + pixelDiff + ', twips:' + diff);
+ this._map.sendUnoCommand('.uno:MoveTabstop?Tabstop=' + e.currentTarget.tabStopBeingDragged + '&Amount=' + diff);
e.currentTarget.tabStopPrevPos = e.layerX;
},
More information about the Libreoffice-commits
mailing list