loleaflet/src/control/Control.Scroll.js | 2 ++ loleaflet/src/layer/tile/CalcTileLayer.js | 6 ++++++ 2 files changed, 8 insertions(+)
New commits: commit e967b0f388e9c15c192c486b28e2265c9d09508a Author: Henry Castro <hcas...@collabora.com> Date: Sun Nov 8 14:05:08 2015 -0400 loleaflet: add map fire scroll Calc Tile Layer capture scroll offset in order to scroll Columns and Rows diff --git a/loleaflet/src/control/Control.Scroll.js b/loleaflet/src/control/Control.Scroll.js index 1c02140..f9813a4 100644 --- a/loleaflet/src/control/Control.Scroll.js +++ b/loleaflet/src/control/Control.Scroll.js @@ -56,11 +56,13 @@ L.Control.Scroll = L.Control.extend({ this._prevScrollX = -e.mcs.left; this._map.scroll(offset.x, offset.y); } + this._map.fire('scroll', e.mcs); }, _onScrollEnd: function (e) { this._prevScrollY = -e.mcs.top; this._prevScrollX = -e.mcs.left; + this._map.fire('scroll', e.mcs); }, _onScrollTo: function (e) { diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js index 4592516..631ca9d 100644 --- a/loleaflet/src/layer/tile/CalcTileLayer.js +++ b/loleaflet/src/layer/tile/CalcTileLayer.js @@ -11,6 +11,7 @@ L.CalcTileLayer = L.TileLayer.extend({ map.addControl(this._columns); map.addControl(this._rows); map.addControl(L.control.tabs()); + map.on('scroll', this._onScroll, this); }, _onInvalidateTilesMsg: function (textMsg) { @@ -109,6 +110,11 @@ L.CalcTileLayer = L.TileLayer.extend({ } }, + _onScroll: function(point) { + this._columns.offsetColumn(point.left); + this._rows.offsetRow(point.top); + }, + _onStatusMsg: function (textMsg) { var command = L.Socket.parseServerCmd(textMsg); if (command.width && command.height && this._documentInfo !== textMsg) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits