Skip to content

Commit

Permalink
fix(PlanarControls): fix drag when moving out of view domElement
Browse files Browse the repository at this point in the history
  • Loading branch information
mgermerie authored and gchoqueux committed Mar 4, 2021
1 parent 66256bb commit a4f0a3f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Controls/PlanarControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,7 @@ class PlanarControls extends THREE.EventDispatcher {
this.view.domElement.addEventListener('keydown', this._handlerOnKeyDown, false);
this.view.domElement.addEventListener('mousedown', this._handlerOnMouseDown, false);
this.view.domElement.addEventListener('mouseup', this._handlerOnMouseUp, false);
this.view.domElement.addEventListener('mouseleave', this._handlerOnMouseUp, false);
this.view.domElement.addEventListener('mousemove', this._handlerOnMouseMove, false);
this.view.domElement.addEventListener('mousewheel', this._handlerOnMouseWheel, false);
// focus policy
Expand All @@ -897,6 +898,7 @@ class PlanarControls extends THREE.EventDispatcher {
this.view.domElement.removeEventListener('keydown', this._handlerOnKeyDown, true);
this.view.domElement.removeEventListener('mousedown', this._handlerOnMouseDown, false);
this.view.domElement.removeEventListener('mouseup', this._handlerOnMouseUp, false);
this.view.domElement.removeEventListener('mouseleave', this._handlerOnMouseUp, false);
this.view.domElement.removeEventListener('mousemove', this._handlerOnMouseMove, false);
this.view.domElement.removeEventListener('mousewheel', this._handlerOnMouseWheel, false);
this.view.domElement.removeEventListener('mouseover', this._handlerFocusOnMouseOver, false);
Expand Down

0 comments on commit a4f0a3f

Please sign in to comment.