loleaflet/src/map/handler/Map.Scroll.js |   31 ++-----------------------------
 1 file changed, 2 insertions(+), 29 deletions(-)

New commits:
commit cde2a3c36dd9cad92fc34b3994f3f823b4e2e02d
Author: Andras Timar <andras.ti...@collabora.com>
Date:   Thu Nov 16 17:06:39 2017 +0100

    Revert "implemented zooming with Ctrl-<mousewheel>"
    
    This reverts commit a3c1a685cd4107f229b97619bcce9a3646fc7730.
    
    Change-Id: I81141977d630f95683a372711effcf8d5edd9e20

diff --git a/loleaflet/src/map/handler/Map.Scroll.js 
b/loleaflet/src/map/handler/Map.Scroll.js
index 08722e02..9c584ecc 100644
--- a/loleaflet/src/map/handler/Map.Scroll.js
+++ b/loleaflet/src/map/handler/Map.Scroll.js
@@ -39,17 +39,13 @@ L.Map.Scroll = L.Handler.extend({
                var left = Math.max(debounce - (+new Date() - this._startTime), 
0);
 
                clearTimeout(this._timer);
-               if (e.ctrlKey) {
-                       this._timer = setTimeout(L.bind(this._performZoom, 
this), left);
-               }
-               else if (e.shiftKey) {
+               if (e.shiftKey) {
                        this._vertical = 0;
-                       this._timer = setTimeout(L.bind(this._performScroll, 
this), left);
                }
                else {
                        this._vertical = 1;
-                       this._timer = setTimeout(L.bind(this._performScroll, 
this), left);
                }
+               this._timer = setTimeout(L.bind(this._performScroll, this), 
left);
 
                L.DomEvent.stop(e);
        },
@@ -64,29 +60,6 @@ L.Map.Scroll = L.Handler.extend({
 
                if (!delta) { return; }
                map.fire('scrollby', {x: (1 - this._vertical) * delta * 
scrollAmount, y: this._vertical * delta * scrollAmount});
-       },
-
-       _performZoom: function () {
-               var map = this._map,
-                   delta = this._delta,
-                   zoom = map.getZoom();
-
-               map.stop(); // stop panning and fly animations if any
-
-               delta = delta > 0 ? Math.ceil(delta) : Math.floor(delta);
-               delta = Math.max(Math.min(delta, 4), -4);
-               delta = map._limitZoom(zoom + delta) - zoom;
-
-               this._delta = 0;
-               this._startTime = null;
-
-               if (!delta) { return; }
-
-               if (map.options.scrollWheelZoom === 'center') {
-                       map.setZoom(zoom + delta);
-               } else {
-                       map.setZoomAround(this._lastMousePos, zoom + delta);
-               }
        }
 });
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to