literyzjs-timeline/bbtimeline-flourish-canvas.js
2023-10-20 00:22:29 +01:00

22 lines
494 B
JavaScript

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();
}
}