Skip to content

Commit

Permalink
add 'drop' method
Browse files Browse the repository at this point in the history
  • Loading branch information
Ni55aN committed May 26, 2023
1 parent a01e0c4 commit 8e33bb2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ export class ConnectionPlugin<Schemes extends ClassicScheme, K = Requires> exten
}
}

drop() {
const flowContext = { editor: this.editor, scope: this, socketsCache: this.socketsCache }

if (this.currentFlow) {
this.currentFlow.drop(flowContext)
this.preudoconnection.unmount(this.areaPlugin)
this.currentFlow = null
}
}

// eslint-disable-next-line max-statements
async pick(event: PointerEvent, type: EventType) {
const flowContext = { editor: this.editor, scope: this, socketsCache: this.socketsCache }
Expand Down

0 comments on commit 8e33bb2

Please sign in to comment.