Mindmap direction change doesn't refresh the transformer outline #30

Open
opened 2026-04-21 13:13:41 +00:00 by AhmedHanafy725 · 1 comment
Member

Flipping a mindmap between Vertical (top-down) and Horizontal (left-right) re-lays-out the nodes but leaves the selection transformer's outline and anchors at the previous orientation's bounding box. The user has to click away and re-select to get the outline to hug the new layout.

Affected entry points:

  • mindmap.js flipDirection(group) — called by the in-widget direction toggle icon and by the L keyboard shortcut. Calls renderMindmap + onUpdate but not transformer.forceUpdate.
  • properties.js prop-mm-direction change handler — calls WhiteboardMindmap.redraw(currentNode) but not onUpdate (so the change is not persisted either) and not transformer.forceUpdate.

Fix: after re-rendering the mindmap on direction change, call transformer.forceUpdate() if the group is currently selected, and (for the properties-panel path) also call WhiteboardSync.onUpdate so the new orientation survives reload.

Flipping a mindmap between Vertical (top-down) and Horizontal (left-right) re-lays-out the nodes but leaves the selection transformer's outline and anchors at the previous orientation's bounding box. The user has to click away and re-select to get the outline to hug the new layout. Affected entry points: - `mindmap.js` `flipDirection(group)` — called by the in-widget direction toggle icon and by the L keyboard shortcut. Calls `renderMindmap` + `onUpdate` but not `transformer.forceUpdate`. - `properties.js` `prop-mm-direction` change handler — calls `WhiteboardMindmap.redraw(currentNode)` but not `onUpdate` (so the change is not persisted either) and not `transformer.forceUpdate`. Fix: after re-rendering the mindmap on direction change, call `transformer.forceUpdate()` if the group is currently selected, and (for the properties-panel path) also call `WhiteboardSync.onUpdate` so the new orientation survives reload.
Author
Member

Pull request opened: #31

Pull request opened: https://forge.ourworld.tf/lhumina_code/hero_whiteboard/pulls/31
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_whiteboard#30
No description provided.