gpt4 book ai didi

javascript - 这个 Observablehq 示例中的 "invalidation"是什么?

转载 作者:行者123 更新时间:2023-12-04 17:20:15 28 4
gpt4 key购买 nike

https://observablehq.com/@d3/force-directed-lattice?collection=@d3/d3-drag
有一条线invalidation.then(() => simulation.stop());这是什么失效?通过console.log,这是一个 promise ,但我没有看到它在任何地方定义。

最佳答案

Observablehq 加载 standard library ,它提供了 invalidation 方法。根据文档,invalidation是...

A promise that resolves when the current cell is re-evaluated: when the cell’s code changes, when it is run using Shift-Enter, or when a referenced input changes.


本笔记本详细讲解: https://observablehq.com/@observablehq/invalidation

关于javascript - 这个 Observablehq 示例中的 "invalidation"是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66656741/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com