[Libreoffice-commits] online.git: loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Feb 22 10:54:57 UTC 2019
loleaflet/src/map/handler/Map.Scroll.js | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
New commits:
commit 12fa2aafa0735779beb260206f1c00b48cbdd2c8
Author: merttumer <mert.tumer at collabora.com>
AuthorDate: Wed Feb 13 20:19:50 2019 +0300
Commit: Jan Holesovsky <kendy at 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.tumer at collabora.com>
Change-Id: I2cb6becb474fdfd31b669a5928213228297375c5
Reviewed-on: https://gerrit.libreoffice.org/67788
Reviewed-by: Aron Budea <aron.budea at collabora.com>
Tested-by: Aron Budea <aron.budea at collabora.com>
Reviewed-by: Jan Holesovsky <kendy at 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);
+ }
}
}
});
More information about the Libreoffice-commits
mailing list