Show End trendline here for any click after the first anchor.

It used to require a time past last_t, so a line whose second point
already sits at the live edge never offered the item.
This commit is contained in:
Chris Amow 2026-09-04 03:32:42 -05:00
parent 72bcd0fa61
commit 3d27ef285c

View file

@ -3309,7 +3309,8 @@ class ConfluenceChart {
Math.abs(bar.t - point.t) < Math.abs(nearest.t - point.t) ? bar : nearest
).t;
this.contextLineId = level.id;
this.contextCutoff = cutoff > level.last_t ? cutoff : null;
const origin = Math.min(level.anchor_t, level.last_t);
this.contextCutoff = cutoff != null && cutoff > origin ? cutoff : null;
this.contextEndButton.hidden = this.contextCutoff == null;
this.contextExtendButton.hidden = level.cutoff_t == null;
this.contextMenu.hidden = false;