From 7f0c8fe89961fe75d60ed4abd536ffb178c23e7c Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 14 Aug 2017 09:25:41 -0400 Subject: [PATCH] Use ol.coordinate.equals --- src/ol/view.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ol/view.js b/src/ol/view.js index 4f5e6d33ee..6cb1b3338f 100644 --- a/src/ol/view.js +++ b/src/ol/view.js @@ -1173,11 +1173,8 @@ ol.View.createRotationConstraint_ = function(options) { * @return {boolean} The animation involves no view change. */ ol.View.isNoopAnimation = function(animation) { - if (animation.sourceCenter) { - if (animation.sourceCenter[0] !== animation.targetCenter[0]) { - return false; - } - if (animation.sourceCenter[1] !== animation.targetCenter[1]) { + if (animation.sourceCenter && animation.targetCenter) { + if (!ol.coordinate.equals(animation.sourceCenter, animation.targetCenter)) { return false; } }