fix(webframe): hide iframe overlay during drag/pan/zoom to kill desync #23
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_whiteboard!23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_webframe_iframe_drag_glitch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Eliminates the iframe glitchyness reported in issue #16. During drag, stage pan, and wheel-zoom, the HTML iframe overlay visibly lagged behind the Konva-rendered header, and inconsistent z-index layering made the header appear detached from the body when other canvas objects overlapped the web frame.
Related Issue
Closes #16
Changes
crates/hero_whiteboard_ui/static/web/js/whiteboard/webframe.jshideOverlay(id)/showOverlay(id, group)helpers and module-levelhideAllOverlays()/showAllOverlays()._hiddenForInteractiongate inupdateOverlayPositionso the wrapper can't be re-revealed mid-interaction.group.on('dragmove', updateOverlayPosition)withdragstart-> hide anddragend-> show.stage.on('dragmove.wf_<id>', ...)withdragstart.wf_<id>/dragend.wf_<id>.setTimeoutwheel handler with a 150 ms debounced hide-then-show using_wheelTimeout.destroyOverlay/remapOverlayclean up the new listeners and cancel pending_wheelTimeout.crates/hero_whiteboard_ui/static/web/js/whiteboard/tools.jstransformer.on('transformstart')now also callsWhiteboardWebframe.hideAllOverlays().transformer.on('transformend')callsWhiteboardWebframe.showAllOverlays()afterapplyTransformhas written the final bg dimensions.crates/hero_whiteboard_ui/static/web/js/whiteboard/objects.jswebframebranch ofapplyTransform, also update the.placeholderText (width/height) and.labelText (width) to match the new bg dimensions, so the Konva stand-in visible during drag/pan/zoom always matches the real frame.Test Results
cargo check --workspace: passcargo clippy --workspace -- -D warnings: passcargo fmt --check: passcargo test --workspace --lib: 0 passed / 0 failed (workspace has no Rust unit tests)The changes are entirely vanilla JS and need manual UI verification in the browser.
Manual verification