Use ol.coordinate.equals
This commit is contained in:
1 parent
48178f0e31
commit
7f0c8fe899
1 file changed
+2
-5
+2
-5
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user