diff --git a/src/components/super-networked-interactable.js b/src/components/super-networked-interactable.js index 418b8e50f9b6d5b8f3eb7b89f4547e4dd23aee47..3b84bb7ac3b99421024113d527aa8a1ea54da725 100644 --- a/src/components/super-networked-interactable.js +++ b/src/components/super-networked-interactable.js @@ -24,17 +24,17 @@ AFRAME.registerComponent("super-networked-interactable", { } }); - this.grabStartListener = this._onGrabStart.bind(this); - this.ownershipLostListener = this._onOwnershipLost.bind(this); - this.el.addEventListener("grab-start", this.grabStartListener); - this.el.addEventListener("ownership-lost", this.ownershipLostListener); + this._onGrabStart = this._onGrabStart.bind(this); + this._onOwnershipLost = this._onOwnershipLost.bind(this); + this.el.addEventListener("grab-start", this._onGrabStart); + this.el.addEventListener("ownership-lost", this._onOwnershipLost); this.system.addComponent(this); }, remove: function() { this.counter.deregister(this.el); - this.el.removeEventListener("grab-start", this.grabStartListener); - this.el.removeEventListener("ownership-lost", this.ownershipLostListener); + this.el.removeEventListener("grab-start", this._onGrabStart); + this.el.removeEventListener("ownership-lost", this._onOwnershipLost); this.system.removeComponent(this); },