mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
use closeNode for eventbus layoutaction
This commit is contained in:
parent
b0a09db4d1
commit
a97b8cca58
@ -275,11 +275,7 @@ function handleWSEventMessage(msg: WSEventType) {
|
||||
case LayoutTreeActionType.DeleteNode: {
|
||||
const leaf = layoutModel?.getNodeByBlockId(layoutAction.blockid);
|
||||
if (leaf) {
|
||||
const deleteNodeAction = {
|
||||
type: LayoutTreeActionType.DeleteNode,
|
||||
nodeId: leaf.id,
|
||||
};
|
||||
layoutModel.treeReducer(deleteNodeAction);
|
||||
layoutModel.closeNode(leaf);
|
||||
} else {
|
||||
console.error(
|
||||
"Cannot apply eventbus layout action DeleteNode, could not find leaf node with blockId",
|
||||
|
Loading…
Reference in New Issue
Block a user