You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

TimeSlider日期选择更新异常及addTimeSelection函数报错咨询

问题描述

我基于Autodesk Platform Services的aps-iot-extensions-demo仓库的experiment/time-select分支做了修改(比如添加其他扩展),为实现用户选择新日期时更新TimeSlider的显示日期,我参照Autodesk Forge的forge-dataviz-iot-react-components仓库中ChronosTimeSlider.jsx文件里的updateSelection()和createTimeSelection()函数做了复现。

我在resolve中使用zoomTo来实现对已选日期范围的精准缩放,但遇到两个问题:

  • 超出初始日期范围后,TimeSlider不再更新。例如加载Viewer时的初始日期范围为2023年12月30日至2024年1月15日,在此区间内选择日期时TimeSlider可正常更新,但选择2024年12月28日这类超出范围的日期时无任何变化。
  • 出现报错:Uncaught TypeError: line.addTimeSelection is not a function,相关代码有对应截图。

内容的提问来源于stack exchange,提问作者Amel NAIT-AMER

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.30 21:12:13