fix
This commit is contained in:
@@ -244,7 +244,6 @@
|
||||
importFlow(json)
|
||||
}else{
|
||||
const timestamp = Date.now()
|
||||
console.log(1)
|
||||
nodeManager.createResultNode({
|
||||
data: {
|
||||
disableDelete: true,
|
||||
@@ -263,7 +262,6 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(2)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
@@ -43,11 +43,13 @@ export class NodeManager {
|
||||
|
||||
/** 创建节点 */
|
||||
createNode(options: NodeOptions) {
|
||||
console.log(1)
|
||||
const superiorID = options?.data?.superiorID
|
||||
const snode = superiorID ? this.stateManager.flowManager.getNodeById(superiorID) : this.stateManager.flowManager.getLastNode();
|
||||
const id = options.id || createId()
|
||||
const positionX = options.positionX || 0
|
||||
const positionY = options.positionY || 0
|
||||
console.log(2)
|
||||
const position = options.position ||
|
||||
(!snode ?
|
||||
{ x: positionX, y: positionY } :
|
||||
@@ -62,12 +64,13 @@ export class NodeManager {
|
||||
position,
|
||||
data
|
||||
}
|
||||
console.log(3)
|
||||
this.addNode(options_)
|
||||
console.log(4)
|
||||
return options_;
|
||||
}
|
||||
/** 创建结果节点 */
|
||||
createResultNode(options?: NodeOptions) {
|
||||
console.log(3)
|
||||
const options_ = {
|
||||
...(options ? options : {}),
|
||||
component: NODE_COMPONENT.RESULT_IMAGE,
|
||||
@@ -80,7 +83,6 @@ export class NodeManager {
|
||||
...(options?.data || {}),
|
||||
},
|
||||
}
|
||||
console.log(4)
|
||||
return this.createNode(options_)
|
||||
}
|
||||
/** 创建卡片选择节点 */
|
||||
|
||||
Reference in New Issue
Block a user