mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 07:12:40 +02:00
WebTablet.js: Don't remove or add mouse callbacks onHMDChanged
This should prevent the exception on destroy, caused by disconnecting a signal that is not attached.
This commit is contained in:
parent
e18357196a
commit
29a159b90d
1 changed files with 0 additions and 10 deletions
|
@ -429,16 +429,6 @@ WebTablet.prototype.calculateTabletAttachmentProperties = function (hand, useMou
|
|||
|
||||
WebTablet.prototype.onHmdChanged = function () {
|
||||
|
||||
if (HMD.active) {
|
||||
Controller.mousePressEvent.disconnect(this.myMousePressEvent);
|
||||
Controller.mouseMoveEvent.disconnect(this.myMouseMoveEvent);
|
||||
Controller.mouseReleaseEvent.disconnect(this.myMouseReleaseEvent);
|
||||
} else {
|
||||
Controller.mousePressEvent.connect(this.myMousePressEvent);
|
||||
Controller.mouseMoveEvent.connect(this.myMouseMoveEvent);
|
||||
Controller.mouseReleaseEvent.connect(this.myMouseReleaseEvent);
|
||||
}
|
||||
|
||||
var tabletProperties = {};
|
||||
// compute position, rotation & parentJointIndex of the tablet
|
||||
this.calculateTabletAttachmentProperties(NO_HANDS, false, tabletProperties);
|
||||
|
|
Loading…
Reference in a new issue