in src/animator.ts [125:249]
constructor(chart: Visual, svg: Selection<BaseType, any, BaseType, any>) {
this.chart = chart;
this.svg = svg;
this.setDefaultValues();
let container: Selection<BaseType, any, BaseType, any> = this.container = this.svg
.append("g")
.classed(Animator.ControlsContainer.className, true)
.style("display", "none");
this.animationPlay = container
.append("g")
.classed(Animator.AnimationPlay.className, true);
this.animationPlay
.append("circle")
.attr("cx", Animator.buttonCenter)
.attr("cy", Animator.buttonCenter)
.attr("r", Animator.buttonRadius)
.attr("fill", "transparent");
this.animationPlay
.call(pulseChartUtils.addOnTouchClick, () => this.play());
this.animationPlay
.append("path")
.attr("d", Animator.PlayButtonMarkup);
this.animationPause = container
.append("g")
.classed(Animator.AnimationPause.className, true);
this.animationPause
.append("circle")
.attr("cx", Animator.buttonCenter)
.attr("cy", Animator.buttonCenter)
.attr("r", Animator.buttonRadius)
.attr("fill", "transparent");
this.animationPause
.call(pulseChartUtils.addOnTouchClick, () => this.stop());
this.animationPause
.append("path")
.attr("d", Animator.PauseButtonMarkup);
this.animationReset = container
.append("g")
.classed(Animator.AnimationReset.className, true);
this.animationReset
.append("circle")
.attr("cx", Animator.buttonCenter)
.attr("cy", Animator.buttonCenter)
.attr("r", Animator.buttonRadius)
.attr("fill", "transparent");
this.animationReset
.call(pulseChartUtils.addOnTouchClick, () => this.reset());
this.animationReset
.append("path")
.attr("d", Animator.ResetButtonMarkup);
// Prev
this.animationPrev = container
.append("g")
.classed(Animator.AnimationPrev.className, true);
this.animationPrev
.append("circle")
.attr("cx", Animator.buttonCenter)
.attr("cy", Animator.buttonCenter)
.attr("r", Animator.buttonRadius)
.attr("fill", "transparent");
this.animationPrev
.call(pulseChartUtils.addOnTouchClick, () => this.prev());
this.animationPrev
.append("path")
.attr("d", Animator.PrevButtonMarkup);
// Next
this.animationNext = container
.append("g")
.classed(Animator.AnimationNext.className, true);
this.animationNext
.append("circle")
.attr("cx", Animator.buttonCenter)
.attr("cy", Animator.buttonCenter)
.attr("r", Animator.buttonRadius)
.attr("fill", "transparent");
this.animationNext
.call(pulseChartUtils.addOnTouchClick, () => this.next());
this.animationNext
.append("path")
.attr("d", Animator.NextButtonMarkup)
.attr("rotate", Animator.buttonRotate);
this.animationToEnd = container
.append("g")
.classed(Animator.AnimationToEnd.className, true);
this.animationToEnd
.append("circle")
.attr("cx", Animator.buttonCenter)
.attr("cy", Animator.buttonCenter)
.attr("r", Animator.buttonRadius)
.attr("fill", "transparent");
this.animationToEnd
.call(pulseChartUtils.addOnTouchClick, () => this.toEnd());
this.animationToEnd
.append("path")
.attr("d", Animator.EndButtonMarkup);
this.runnerCounter = container
.append("g")
.classed(Animator.RunnerCounter.className, true);
this.runnerCounterText = this.runnerCounter.append("text");
this.setControlsColor(Animator.DefaultControlsColor);
}