gpt4 book ai didi

css - d3 hover css 在图表停止时停止工作 "ticking"

转载 作者:太空宇宙 更新时间:2023-11-03 18:26:29 25 4
gpt4 key购买 nike

This fiddle demonstrates the problem with hover .基本上,虽然图形是动画的,但我的悬停类工作正常。但是一旦它稳定下来, :hover 就会停止工作。它也不只是伪 CSS 类。我还尝试了 mouseOver/mouseOut 事件来添加/删除类。此方法也停止运行。一旦您拖动一个节点并且动画恢复,悬停/鼠标悬停也是如此。

function tick() {
path.attr("d", linkArc);
node.attr("transform", transform);
}
//I had no idea what code to paste but it requires it with a linked fiddle.

最佳答案

这似乎是一个不错的解决方法:

setInterval(function () { tick(); }, 30);

关于css - d3 hover css 在图表停止时停止工作 "ticking",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20678113/

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