0
アニメーションパスの遷移が最後に描画された位置を返すことができるかどうかを知りたいですか? ..through attrTweenトゥイーン範囲[0-1]を得ることができますが、カーブポーズ??d3js 4パス遷移の座標を取得
例:パスは工場出荷時に既にDOMに存在する場合
function tween (t) {
var totalLength = this.getTotalLength();
//a SVGPoint object with x/y properties
var position = this.getPointAtLength(total * t);
//...do something
}
function tweenFactory (d) {
return tween.bind(this);
}
:
path
.attr("stroke-dasharray", t1 + " " + t1)
.attr("stroke-dashoffset", t1)
.transition(d3.transition()
.duration(lap)
.ease(d3.easeLinear)
.attrTween("e", function(d) {
return function(t) {}})
.attr("stroke-dashoffset",0)
感謝の
Merci!私はattrTweenをトゥイーンに切り替え、リターン関数(t)を戻して動作させました。 – spin0