in src/timeLine.ts [843:879]
public renderCursors(
timelineData: ITimelineData,
cellHeight: number,
cellsYPosition: number,
): D3Selection<any, any, any, any> {
const cursorSelection: D3Selection<any, ICursorDataPoint, any, any> = this.cursorGroupSelection
.selectAll(Timeline.TimelineSelectors.SelectionCursor.selectorName)
.data(timelineData.cursorDataPoints);
cursorSelection
.exit()
.remove();
return cursorSelection
.enter()
.append("path")
.classed(Timeline.TimelineSelectors.SelectionCursor.className, true)
.merge(cursorSelection)
.attr("transform", (cursorDataPoint: ICursorDataPoint) => {
const dx: number = cursorDataPoint.selectionIndex * this.timelineProperties.cellWidth;
const dy: number = cellHeight / Timeline.CellHeightDivider + cellsYPosition;
return svgManipulation.translate(dx, dy);
})
.attr("d", d3Arc<ICursorDataPoint>()
.innerRadius(0)
.outerRadius(cellHeight / Timeline.CellHeightDivider)
.startAngle((cursorDataPoint: ICursorDataPoint) => {
return cursorDataPoint.cursorIndex * Math.PI + Math.PI;
})
.endAngle((cursorDataPoint: ICursorDataPoint) => {
return cursorDataPoint.cursorIndex * Math.PI + 2 * Math.PI;
}),
)
.style("fill", this.settings.cursor.color)
.call(this.cursorDragBehavior);
}