Use ol.coordinate.equals
This commit is contained in:
@@ -1173,11 +1173,8 @@ ol.View.createRotationConstraint_ = function(options) {
|
|||||||
* @return {boolean} The animation involves no view change.
|
* @return {boolean} The animation involves no view change.
|
||||||
*/
|
*/
|
||||||
ol.View.isNoopAnimation = function(animation) {
|
ol.View.isNoopAnimation = function(animation) {
|
||||||
if (animation.sourceCenter) {
|
if (animation.sourceCenter && animation.targetCenter) {
|
||||||
if (animation.sourceCenter[0] !== animation.targetCenter[0]) {
|
if (!ol.coordinate.equals(animation.sourceCenter, animation.targetCenter)) {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (animation.sourceCenter[1] !== animation.targetCenter[1]) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user