literyzjs-timeline/bbtimeline-flourish-canvas.js
Ray 0bbed0dfee Changed to multi-layer for hot-tracking and other flourishes
Changed default colours
Added X-Axis top and bottom positions
2023-10-22 22:14:12 +01:00

33 lines
878 B
JavaScript

class BBTimelineFlourishCanvas extends BBTimelineCanvas {
constructor(parentEl, el) {
super(parentEl, el);
const a = this;
a.XPos = -1;
}
Invalidate() {
const a = this;
a.Clear();
if (a.XPos < 0) {
a.Clear();
} else {
let posY = 0;
if (a.Parent.XAxis.Position == 'top') {
posY = a.Parent.Layer.Background.GraphRectangle.Y;
} else {
posY = (a.Parent.Layer.Background.GraphRectangle.Y + a.Parent.Layer.Background.GraphRectangle.H);
}
// a.drawVerticalLine(a.XPos, a.Parent.Layer.Background.GraphRectangle.Y, (a.Parent.Layer.Background.GraphRectangle.Y + a.Parent.Layer.Background.GraphRectangle.H), a.Parent.MarkerLabel.Line.Width, a.Parent.HotTrack.Colour);
a.drawCircle(a.XPos, posY, a.Parent.HotTrack.Width, 0, a.Parent.HotTrack.Colour, a.Parent.HotTrack.Colour);
}
}
}