literyzjs-timeline/bbtimeline-flourish-canvas.js

22 lines
494 B
JavaScript
Raw Normal View History

2023-10-19 23:22:29 +00:00
class BBTimelineFlourishCanvas extends BBTimelineCanvas {
constructor(parentEl, el) {
super(parentEl, el);
}
DrawVerticalLine(x) {
const a = this;
const rect = a.Parent.Layer.Background.GraphRectangle;
const linePosY = (rect.Y + rect.H);
a.Clear();
a.CTX.beginPath();
a.CTX.moveTo(x, rect.Y);
a.CTX.lineTo(x, (linePosY - a.Parent.Marker.Line.Width));
a.CTX.lineWidth = 1;
a.CTX.strokeStyle = a.Parent.HotTrack.Colour;
a.CTX.stroke();
}
}