This commit is contained in:
Timothy J. Baek 2024-09-28 19:25:41 +02:00
parent 276ce3374d
commit 5a168ecc2a

View File

@ -38,13 +38,16 @@
$: if (history && history.currentId) { $: if (history && history.currentId) {
focusNode(); focusNode();
selectedMessageId = null;
} }
const focusNode = async () => { const focusNode = async () => {
if (selectedMessageId === null) { if (selectedMessageId === null) {
await fitView({ nodes: [{ id: history.currentId }] }); await fitView({ nodes: [{ id: history.currentId }] });
} else {
await fitView({ nodes: [{ id: selectedMessageId }] });
} }
selectedMessageId = null;
}; };
const drawFlow = async () => { const drawFlow = async () => {