{
let e = detail.detail
if (e.event.shiftKey || e.type == 'identity') {
selectNextId(e.id)
removeAtId($flowStore.value.modules, e.id)
$flowStore = $flowStore
} else {
idToRemove = e.id
}
}}
on:insert={async ({ detail }) => {
if (detail.modules) {
await insertNewModuleAtIndex(detail.modules, detail.index ?? 0, detail.detail)
$flowStore = $flowStore
$selectedId = detail.modules[detail.index ?? 0].id
}
}}
on:newBranch={async ({ detail }) => {
if (detail.module) {
await addBranch(detail.module)
$flowStore = $flowStore
}
}}
on:deleteBranch={async ({ detail }) => {
if (detail.module) {
await removeBranch(detail.module, detail.index)
$flowStore = $flowStore
$selectedId = detail.module.id
}
}}
/>