[Libreoffice-commits] online.git: loleaflet/src
Henry Castro
hcastro at collabora.com
Sun Nov 8 10:35:28 PST 2015
loleaflet/src/layer/tile/CalcTileLayer.js | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 5485d63aeeb6bb027896eb7642dbe99f5785b082
Author: Henry Castro <hcastro at collabora.com>
Date: Sun Nov 8 14:34:51 2015 -0400
loleaflet: handle zoom to update columns and rows
diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js
index 631ca9d..d1f5a42 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -12,6 +12,7 @@ L.CalcTileLayer = L.TileLayer.extend({
map.addControl(this._rows);
map.addControl(L.control.tabs());
map.on('scroll', this._onScroll, this);
+ map.on('zoomend', this._onZoomRowColumns, this);
},
_onInvalidateTilesMsg: function (textMsg) {
@@ -115,6 +116,11 @@ L.CalcTileLayer = L.TileLayer.extend({
this._rows.offsetRow(point.top);
},
+ _onZoomRowColumns: function () {
+ this._columns.updateColumns(this._twipsToPixels, this);
+ this._rows.updateRows(this._twipsToPixels, this);
+ },
+
_onStatusMsg: function (textMsg) {
var command = L.Socket.parseServerCmd(textMsg);
if (command.width && command.height && this._documentInfo !== textMsg) {
More information about the Libreoffice-commits
mailing list