I want to give an object an attribute once a transition is finished. I'm simply updating an images position as follows:
tmp.transition().duration(1000)
.attr("transform", function(d) {return 'translate(' +
coordinates[d].x +',' +
coordinates[d].y + ')'})
Once it finishes, I want to give the object tmp an attribute "moved" with the value "no". I tried:
tmp.transition().duration(1000)
.attr("transform", function(d) {return 'translate(' +
coordinates[d].x +',' +
coordinates[d].y + ')'}).end('moved', 'no')
But without success. Any tips? Thanks,