[Libreoffice-commits] online.git: loleaflet/src
Henry Castro
hcastro at collabora.com
Thu Sep 21 15:27:57 UTC 2017
loleaflet/src/control/Control.Scroll.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit e45d05f84766d751e5e52291c7e29ba5cf99c0df
Author: Henry Castro <hcastro at collabora.com>
Date: Thu Sep 21 11:21:13 2017 -0400
loleaflet: resolves: no row header in revision history
_onUpdateScrollOffset is triggered when the client window is resized or
when it is loading a new document. However, there are some cases when
the offset is 0, it means to update row and columns.
Change-Id: If4c4bb4f50335c642004ceb7723c8b5eb949cada
diff --git a/loleaflet/src/control/Control.Scroll.js b/loleaflet/src/control/Control.Scroll.js
index 89affd46..06dfae20 100644
--- a/loleaflet/src/control/Control.Scroll.js
+++ b/loleaflet/src/control/Control.Scroll.js
@@ -233,9 +233,13 @@ L.Control.Scroll = L.Control.extend({
// used on window resize
if (this._map._docLayer._docType === 'spreadsheet') {
var offset = new L.Point(e.x - this._prevScrollX, e.y - this._prevScrollY);
- if (!offset.equals(new L.Point(0, 0))) {
- this._onUpdateRowColumnHeaders({x: e.x, y: e.y, offset: offset});
+ if (offset.x === 0) {
+ offset.x = 1;
}
+ if (offset.y === 0) {
+ offset.y = 1;
+ }
+ this._onUpdateRowColumnHeaders({x: e.x, y: e.y, offset: offset});
}
this._ignoreScroll = null;
$('.scroll-container').mCustomScrollbar('stop');
More information about the Libreoffice-commits
mailing list