我想在轉換完成後爲對象提供屬性。我簡單地更新的圖像位置如下:轉換之後更改對象屬性D3
tmp.transition().duration(1000)
.attr("transform", function(d) {return 'translate(' +
coordinates[d].x +',' +
coordinates[d].y + ')'})
一旦完成,我想給對象TMP屬性「感動」,其值爲「無」。我試過了:
tmp.transition().duration(1000)
.attr("transform", function(d) {return 'translate(' +
coordinates[d].x +',' +
coordinates[d].y + ')'}).end('moved', 'no')
但是沒有成功。有小費嗎?謝謝,
和'每個'與「開始」相反。這非常方便,謝謝 – pstanton