| | |
| | | createParallelBrach(x, y, dragNode) { |
| | | dragNode.position(x + 320, y - dragNode.size().height / 2) |
| | | const connectNode = this.createConnectNode(x + 50, y) |
| | | this.createBrach(dragNode,connectNode,x,y-50) |
| | | this.createBrach(dragNode,connectNode,x,y+50) |
| | | |
| | | return {newStartNode: connectNode, newEndNode: dragNode} |
| | | }, |
| | | createBrach(dragNode,connectNode,x,y){ |
| | | const dashedBox = this.createDashedBox(x + 150, y) |
| | | dragNode.setData({startNodeId: connectNode.id}) |
| | | |
| | |
| | | router: { |
| | | name: 'manhattan', |
| | | args: { |
| | | startDirections: ['right'], // 从下方开始 |
| | | startDirections: ['top','bottom'], // 从下方开始 |
| | | endDirections: ['left'], // 向左方结束 |
| | | }, |
| | | }, |
| | |
| | | name: 'manhattan', |
| | | args: { |
| | | startDirections: ['right'], // 从下方开始 |
| | | endDirections: ['left'], // 向左方结束 |
| | | endDirections: ['top','bottom'], // 向左方结束 |
| | | }, |
| | | }, |
| | | connector: {name: 'rounded'}, |
| | | zIndex: -1 |
| | | }) |
| | | return {newStartNode: connectNode, newEndNode: dragNode} |
| | | /* this.graph.addEdge({ |
| | | source: {cell: startNode, port: 'right1'}, |
| | | target: {cell: connectNode, port: 'left1'}, |
| | | router: {name: 'manhattan'}, |
| | | connector: {name: 'rounded'} |
| | | }) |
| | | this.graph.addEdge({ |
| | | source: {cell: dragNode, port: 'right1'}, |
| | | target: {cell: endNode, port: 'left1'}, |
| | | router: {name: 'manhattan'}, |
| | | connector: {name: 'rounded'} |
| | | })*/ |
| | | }, |
| | | createBridgeConnection(x, y, dragNode) { |
| | | console.log(x, y, 'leftX centerY') |