更改了x6群组

This commit is contained in:
zhaofeiyang 2022-08-04 09:00:55 +08:00
parent 25bd5c5560
commit 3c042f042e
1 changed files with 49 additions and 40 deletions

View File

@ -266,7 +266,6 @@ export default {
this.map = map; this.map = map;
this.map.on('pan', (e) => { this.map.on('pan', (e) => {
this.onRender(); this.onRender();
// console.log(this.dataNodes);
}); });
this.map.on('dragend', (e) => { this.map.on('dragend', (e) => {
@ -492,8 +491,18 @@ this.onRender();
// this.pixelToPoint(args.node, args.node.store.data.position) // this.pixelToPoint(args.node, args.node.store.data.position)
}) })
this.graph.on('node:mouseup', (args) => { this.graph.on('node:mouseup', (args) => {
const container = this.$refs.container
const ports = container.querySelectorAll(
'.x6-port-body',
)
console.log(ports);
this.graph.getNodes().forEach((node) => {
//let mapPoint = node.store.data.mapPoint
this.pixelToPoint(node, node.store.data.position)
})
// //
this.pixelToPoint(args.node, args.node.store.data.position) //this.pixelToPoint(args.node, args.node.store.data.position)
}) })
// //
// this.graph.on('translate', ({ tx, ty }) => { // this.graph.on('translate', ({ tx, ty }) => {