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