Merge pull request #10748 from mike-000/patch-8
Fix "Cannot read property 'anchor' of undefined" in ol/View
This commit is contained in:
+9
-4
@@ -609,10 +609,15 @@ class View extends BaseObject {
|
|||||||
if (series[0].callback) {
|
if (series[0].callback) {
|
||||||
animationCallback(series[0].callback, false);
|
animationCallback(series[0].callback, false);
|
||||||
}
|
}
|
||||||
anchor = anchor ||
|
if (!anchor) {
|
||||||
series.filter(function(animation) {
|
for (let j = 0, jj = series.length; j < jj; ++j) {
|
||||||
return !animation.complete;
|
const animation = series[j];
|
||||||
})[0].anchor;
|
if (!animation.complete) {
|
||||||
|
anchor = animation.anchor;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.animations_.length = 0;
|
this.animations_.length = 0;
|
||||||
this.cancelAnchor_ = anchor;
|
this.cancelAnchor_ = anchor;
|
||||||
|
|||||||
Reference in New Issue
Block a user