mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 07:58:30 +00:00
ifcviewer-web: draw the axis indicator (corner gizmo + orbit pivot)
The desktop viewport draws an RGB triad in the bottom-left corner and a second one at the orbit target while navigating; the web build drew neither. Both lived in the Qt-coupled OverlayRenderer, which only ViewportWindow drives — the web host no-ops the overlay hooks — so the wasm build had no path to them at all. Lift them into AxisIndicatorRenderer, a Qt-free renderer in IfcViewerCore, and drive it from ViewportCore::render for desktop and web alike. Same move SectionGizmoRenderer already made; the drawing code is unchanged apart from swapping qDegreesToRadians for CameraMath's kPiF. Pivot visibility moves to the core with it: it was a QTimer on ViewportWindow, so the afterglow couldn't follow the gizmo across. It is now a Stopwatch deadline next to the drawing, with render() requesting frames until an armed afterglow expires. Hosts keep the same three triggers (on for orbit/pan drags, off on release, 600 ms on wheel). The web demo shell's log overlay sat exactly on top of the corner gizmo, so it shifts right of the 110 px box. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,8 +12,10 @@
|
||||
eats pointer events so the drag keeps reaching the canvas. */
|
||||
#marquee { position: fixed; display: none; z-index: 50; pointer-events: none;
|
||||
border: 1px solid #4a9eff; background: rgba(74, 158, 255, 0.15); }
|
||||
/* Log overlay sits bottom-left and never eats pointer events. */
|
||||
#status { position: fixed; bottom: 8px; left: 12px;
|
||||
/* Log overlay sits bottom-left and never eats pointer events. Kept clear
|
||||
of the corner axis gizmo, which the viewport draws in the bottom-left
|
||||
110 CSS px (plus a 10 px margin). */
|
||||
#status { position: fixed; bottom: 8px; left: 132px;
|
||||
max-width: min(60vw, 680px); max-height: 28vh; overflow-y: auto;
|
||||
font-size: 11px;
|
||||
font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
|
||||
|
||||
Reference in New Issue
Block a user