literyzjs-timeline/bbtimeline-flourish-canvas.js

36 lines
937 B
JavaScript
Raw Normal View History

2023-10-19 23:22:29 +00:00
class BBTimelineFlourishCanvas extends BBTimelineCanvas {
constructor(parentEl, el) {
super(parentEl, el);
}
initialiseOptions() {
super.initialiseOptions();
2023-10-19 23:22:29 +00:00
const a = this;
a.XPos = -1;
2023-10-19 23:22:29 +00:00
}
Invalidate() {
2023-10-19 23:22:29 +00:00
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);
}
2023-10-19 23:22:29 +00:00
}
}