Skip to content

Commit

Permalink
fix: improve code style
Browse files Browse the repository at this point in the history
  • Loading branch information
aMoonkin committed Oct 12, 2023
1 parent e1c9a47 commit bfa50bc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/x6-plugin-selection/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,19 +336,17 @@ export class Selection
}

protected onBlankLeftMouseDown(mouseDownEvent: EventArgs['blank:mousedown']) {
if (mouseDownEvent.e.button !== 0) {
return
if (mouseDownEvent.e.button === 0) {
this.onBlankMouseDown(mouseDownEvent)
}
this.onBlankMouseDown(mouseDownEvent)
}

protected onBlankMouseWheelDown(
mouseDownEvent: EventArgs['blank:mousedown'],
) {
if (mouseDownEvent.e.button !== 1) {
return
if (mouseDownEvent.e.button === 1) {
this.onBlankMouseDown(mouseDownEvent)
}
this.onBlankMouseDown(mouseDownEvent)
}

protected onBlankMouseDown({ e }: EventArgs['blank:mousedown']) {
Expand Down

0 comments on commit bfa50bc

Please sign in to comment.