loleaflet/src/map/handler/Map.Scroll.js | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-)
New commits: commit 12fa2aafa0735779beb260206f1c00b48cbdd2c8 Author: merttumer <mert.tu...@collabora.com> AuthorDate: Wed Feb 13 20:19:50 2019 +0300 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Fri Feb 22 11:54:39 2019 +0100 Disable intermediate zoom levels on calc For calc only 100% and 200% zoom is possible It zooms between by mousewheel Signed-off-by: merttumer <mert.tu...@collabora.com> Change-Id: I2cb6becb474fdfd31b669a5928213228297375c5 Reviewed-on: https://gerrit.libreoffice.org/67788 Reviewed-by: Aron Budea <aron.bu...@collabora.com> Tested-by: Aron Budea <aron.bu...@collabora.com> Reviewed-by: Jan Holesovsky <ke...@collabora.com> diff --git a/loleaflet/src/map/handler/Map.Scroll.js b/loleaflet/src/map/handler/Map.Scroll.js index 9643def07..4abfbb12d 100644 --- a/loleaflet/src/map/handler/Map.Scroll.js +++ b/loleaflet/src/map/handler/Map.Scroll.js @@ -84,9 +84,25 @@ L.Map.Scroll = L.Handler.extend({ if (!delta) { return; } if (map.options.scrollWheelZoom === 'center') { - map.setZoom(zoom + delta); - } else { - map.setZoomAround(this._lastMousePos, zoom + delta); + if (map.getDocType() === 'spreadsheet') { + if (delta > 0) { + map.setZoom(14); // 200% + } else { + map.setZoom(10); // 100% + } + } else { + map.setZoom(zoom + delta); + } + } else { // eslint-disable-next-line no-lonely-if + if (map.getDocType() === 'spreadsheet') { + if (delta > 0) { + map.setZoomAround(this._lastMousePos, 14); // 200% + } else { + map.setZoomAround(this._lastMousePos, 10); // 100% + } + } else { + map.setZoomAround(this._lastMousePos, zoom + delta); + } } } }); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits