MCPcopy Create free account
hub / github.com/Easy-Editor/EasyEditor / unlinkNode

Method unlinkNode

packages/core/src/document/document.ts:263–271  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

261
262 @action
263 unlinkNode(node: Node) {
264 // 追踪物料使用:减少使用计数
265 if (node.componentName) {
266 this.designer.materials.decrementUsage(node.materialUsageKey)
267 }
268
269 this.nodes.delete(node)
270 this._nodesMap.delete(node.id)
271 }
272
273 migrateNode(node: Node, newParent: Node) {
274 if (node.parent === newParent) {

Callers 2

unlinkMethod · 0.80
internalDeleteMethod · 0.80

Calls 2

decrementUsageMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected