mrdoob/three.js — Issue #1053: TrackballControls MouseUp
Author: Furin
Created: 2012-01-09 15:01:40+00:00
State: open

Hello,

I'm loving the library, very nice setup and great pre-made controls. TrackballControls especially is helping me greatly. However, I ran into an issue because I'm running the canvas in a smaller div in my page. TrackballControls wasn't registering my mouseUp's outside of the domElement due to this segment in the three.js sourcecode (line 494 column 466):

this.domElement.addEventListener("mouseup",

I fixed this in my own three.js file by replacing [this.domElement] simply by [document]. Just a heads up in case anyone else is running into this problem, and in case you want to change this in the source, since I can't see a reason to have the mouseUp to only register within the element specified, I could be wrong here but it seems like it only leads to confusion.

-Furin