merge: fix inspector not updating on device/frame selection
startDrag set state.selection but never re-rendered. One render() call after the assignment fixes it. Now selecting a device or frame populates the inspector with name/dims/delete-button as designed.
This commit is contained in:
@@ -617,6 +617,11 @@ function startDrag(e, kind, id) {
|
||||
if (state.tool) return; // a tool is armed; don't hijack
|
||||
e.stopPropagation();
|
||||
state.selection = { kind, id };
|
||||
// Render immediately so the inspector reflects the new selection from
|
||||
// pointerdown — independent of whether the drag-completion render at
|
||||
// the end of onUp runs. (Previously, the inspector only updated if
|
||||
// pointerup completed cleanly; any throw in onUp left it stale.)
|
||||
render();
|
||||
|
||||
const svg = /** @type {SVGSVGElement} */ ($("#canvas"));
|
||||
const start = svgPoint(e);
|
||||
|
||||
Reference in New Issue
Block a user