Commit c4906df
feat(fastsense): hover crosshair + datatip with colored bullets (999.2) (#112)
* feat(260508-d8y-01): add HoverCrosshair class with chained motion handler
- New libs/FastSense/HoverCrosshair.m: handle class managing per-axes
hover crosshair line + multi-line datatip lifecycle
- Chains existing WindowButtonMotionFcn so toolbar crosshair and
NavigatorOverlay drag continue to work
- Pixel-bounds hit-test (skips hidden tabs/panels), ~40 Hz throttle,
re-entrancy guard, em-dash for out-of-range / NaN y
- Theme-consistent colors via FastSense.Theme; safe fallbacks when
theme is empty or partial
- Self-cleanup via ObjectBeingDestroyed listeners on figure + axes;
delete() restores prior callback unconditionally
- tests/test_hover_crosshair.m: Octave-style smoke + chain + cleanup
tests, gracefully skip on headless or pre-Task-2 builds
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(260508-d8y-02): wire HoverCrosshair into FastSense lifecycle
- Add HoverCrosshair public property (default true) for hover crosshair + datatip
- Add HoverCrosshair_ private property holding runtime instance
- Constructor accepts 'HoverCrosshair' option via parseOpts
- render() instantiates HoverCrosshair(obj) when enabled (try/catch for resilience)
- delete() tears down HoverCrosshair_ first so chained motion handler
is restored before figure teardown
- Backward compatible: opt-out via fp.HoverCrosshair=false; serialization untouched
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(quick-260508-d8y): record FastSense hover crosshair + datatip in STATE.md
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(hover-crosshair): coerce CurrentPoint to pixels regardless of fig Units
DashboardEngine creates classic figures with Units='normalized', so
get(hFigure,'CurrentPoint') returned normalized [0..1] coords while
getpixelposition() always returns pixels. The hit test in
onFigureMove_ compared mismatched coordinate systems and always
fell through to onLeave(), so hover never showed inside dashboard
widgets (it worked for standalone FastSense figures because those
default to Units='pixels').
Switch the figure to Units='pixels' just long enough to read
CurrentPoint, then restore. No layout impact.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(hover-crosshair): colored bullet per row in datatip
Each per-line row now starts with a TeX-rendered \bullet in that
line's actual rendered color (read from lineRec.hLine 'Color' with
fall-back to Options.Color), followed by the existing
"DisplayName: yStr". Multi-line plots become readable at a glance:
the bullet matches the line, the name matches the bullet.
- Tip box now uses Interpreter='tex' (set both at create-time and on
every refresh) so \color[rgb]{...}\bullet directives render.
- New static helpers HoverCrosshair.resolveLineColor_ and
HoverCrosshair.escapeTeX_ keep TeX-special chars in DisplayNames
from breaking layout.
- Header row (formatted x value) is unchanged — no bullet.
HoverCrosshair stays default-on with opt-out via
'HoverCrosshair', false in the FastSense constructor (already shipped
in 289216a). All 10 targeted tests still pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test(hover-crosshair): add multi-line dashboard widget test helper
MultiLineFastSenseWidget hosts multiple FastSense lines on a single
DashboardEngine widget panel — used to manually verify the colored-
bullet hover datatip end-to-end (multi-line, in-dashboard, themed).
Not a shipped widget; lives under tests/helpers/.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e8b5a25 commit c4906df
5 files changed
Lines changed: 870 additions & 3 deletions
File tree
- .planning
- libs/FastSense
- tests
- helpers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| 157 | + | |
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| |||
216 | 218 | | |
217 | 219 | | |
218 | 220 | | |
| 221 | + | |
219 | 222 | | |
220 | 223 | | |
221 | 224 | | |
| |||
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
| 236 | + | |
233 | 237 | | |
234 | 238 | | |
235 | 239 | | |
| |||
1571 | 1575 | | |
1572 | 1576 | | |
1573 | 1577 | | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
1574 | 1591 | | |
1575 | 1592 | | |
1576 | 1593 | | |
| |||
1898 | 1915 | | |
1899 | 1916 | | |
1900 | 1917 | | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
1901 | 1924 | | |
1902 | 1925 | | |
1903 | 1926 | | |
| |||
0 commit comments