From 4e48170fac5cd53929f9ec8ebb1f5f85e3a77881 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Sat, 26 Sep 2015 10:50:50 +0200 Subject: [PATCH] Only animate when resolution is about to be changed --- src/ol/interaction/interaction.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ol/interaction/interaction.js b/src/ol/interaction/interaction.js index 07cbff4518..be0aa3cbfd 100644 --- a/src/ol/interaction/interaction.js +++ b/src/ol/interaction/interaction.js @@ -222,6 +222,7 @@ ol.interaction.Interaction.zoomWithoutConstraints = var currentResolution = view.getResolution(); var currentCenter = view.getCenter(); if (currentResolution !== undefined && currentCenter && + resolution !== currentResolution && opt_duration && opt_duration > 0) { map.beforeRender(ol.animation.zoom({ resolution: /** @type {number} */ (currentResolution),