Add hover selection handling for 'select' tool mode in ViewportHost

This commit is contained in:
2026-04-04 20:11:41 +02:00
parent f9da8a83fa
commit 7ab407608e

View File

@@ -3084,6 +3084,16 @@ export class ViewportHost {
return;
}
if (this.toolMode === "select") {
const hoveredCandidate = this.getSelectionCandidates(event)[0]?.selection ?? { kind: "none" };
this.setHoveredSelection(hoveredCandidate);
return;
}
this.setHoveredSelection({
kind: "none"
});
if (this.toolMode !== "create" || this.creationPreview === null) {
return;
}
@@ -3136,6 +3146,10 @@ export class ViewportHost {
return;
}
this.setHoveredSelection({
kind: "none"
});
// Keep the shared creation preview alive across panel boundaries; the next
// viewport panel will update it as the pointer continues moving.
};