diff --git a/src/data/projEntry.tsx b/src/data/projEntry.tsx index f44f976..1bcab95 100644 --- a/src/data/projEntry.tsx +++ b/src/data/projEntry.tsx @@ -414,7 +414,12 @@ export const main = createLayer("main", function (this: BaseLayer) { return otherNode.type === "resource"; }, onDrop(node, otherNode) { - node.state = (otherNode.state as unknown as ResourceState).type; + const droppedType = (otherNode.state as unknown as ResourceState).type; + if (node.state === droppedType) { + node.state = undefined; + } else { + node.state = droppedType; + } board.selectedNode.value = node; }, draggable: true