Skip to content

Commit

Permalink
feat:调试
Browse files Browse the repository at this point in the history
  • Loading branch information
yelikang committed Aug 20, 2024
1 parent 7478b0b commit b85ca7f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
35 changes: 21 additions & 14 deletions examples/x6-example-features/src/pages/minimap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default class Example extends React.Component {
// pannable: false,
// }),
// )


this.graph.addNode({
x: 200,
Expand Down Expand Up @@ -102,20 +101,28 @@ export default class Example extends React.Component {
},
})

// this.graph.use(
// new MiniMap({
// container: this.minimapContainer,
// width: 400,
// height: 400,
// padding: 1,
// preserveAspectRatio: false,
// graphOptions: {
// width: 400,
// height: 400,
// },
// }),
// )

this.graph.use(
new MiniMap({
container: this.minimapContainer,
width: 400,
height: 400,
padding: 1,
preserveAspectRatio:false,
graphOptions:{
width:400,
height:400
}
}),
)

this.graph.on('cell:click', ({ e, x, y, cell, view }) => {
console.log('graph cell:click')
})

this.graph.on('node:click',()=>{
console.log('graph node:click')
})

}

Expand Down
2 changes: 1 addition & 1 deletion packages/x6/src/graph/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ export class Graph extends Basecoat<EventArgs> {
// #region coord

/**
* 捕捉到栅格?(是否捕捉到栅格上的元素)
* 当前事件在栅格中的坐标
* @param x
* @param y
* @returns
Expand Down

0 comments on commit b85ca7f

Please sign in to comment.