d3.js - D3 transitions - pause and resume -
i trying understand 'pause' , 'resume' d3 transitions guide. while understand how 'pause' working, little lost when comes 'resume'. couldn't make sense of author's explanation, 'linear' or first resume explanation. question e.attr("t",0); , .attr("t",1); doing exactly?
i applying resume functionality playhead video or waveform example here: jsfiddle
the code e.attr("t",0) , .attr("t",1) sets attributes node selected. is, new attribute "t" created , set. purpose of purely facilitate stopping , resuming -- 0 represents transition before start , 1 @ end.
if attribute included in transition, value gradually change 0 1. author of tutorial points out, can used state of transition @ point in time -- need query value of "t". if save particular transition well, can use value pause , resume @ point.
note there nothing special "t". can use (unused) attribute name. purpose have way of telling how far transition has progressed.
Comments
Post a Comment