Updating the property of the view gets triggered multiple times on extent change in ArcGIS API for JavaScript 4.24.
上次发布: October 10, 2022ArcGIS API for JavaScript
漏洞 ID 编号
BUG-000152563
已提交
September 26, 2022
上次修改时间
June 5, 2024
适用范围
ArcGIS API for JavaScript
找到的版本
4.24
操作系统
Windows OS
操作系统版本
10.0 64 Bit
状态
As Designed
经开发团队审核,已确定此行为符合设计。 有关详细信息,请参阅“其他信息”部分。
附加信息
The CodePen code provided in this issue works as designed. The number of messages increases in the console for the layerView.updating because a new watcher is installed on layerView.updating every time the view becomes stationary. To run a logic when the view.stationary is true and when layerView.updating is false, use the following code:
view.whenLayerView(featureLayer).then((layerView) => {
// reactiveUtils
reactiveUtils.when(
() => view.stationary && !layerView.updating,
(val) => console.log("reactive: view stationary and not layerView updating", val)
);
});
Refer to this CodePen app for the sample code: https://codepen.io/U_B_U/pen/vYjVYyM?editors=1000.