mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 16:41:02 +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 () {
|
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 = {};
|
var tabletProperties = {};
|
||||||
// compute position, rotation & parentJointIndex of the tablet
|
// compute position, rotation & parentJointIndex of the tablet
|
||||||
this.calculateTabletAttachmentProperties(NO_HANDS, false, tabletProperties);
|
this.calculateTabletAttachmentProperties(NO_HANDS, false, tabletProperties);
|
||||||
|
|
Loading…
Reference in a new issue