feat: postpone keyboard target focusing to improve dragging performance

This commit is contained in:
wtzeng1
2021-04-25 20:25:29 +08:00
committed by vector
parent 9e2ce3ab74
commit 356c7b6971

View File

@ -27,8 +27,8 @@ export class Keyboard extends Disposable implements IDisablable {
this.target.setAttribute('tabindex', '-1')
}
this.graph.on('cell:mousedown', this.focus, this)
this.graph.on('blank:mousedown', this.focus, this)
this.graph.on('cell:mouseup', this.focus, this)
this.graph.on('blank:mouseup', this.focus, this)
}
this.mousetrap = Keyboard.createMousetrap(this)