Closed tmarti closed 5 years ago
In those lines of code belonging to src/viewer/scene/Input.js destructor...
src/viewer/scene/Input.js
https://github.com/xeokit/xeokit-sdk/blob/1a8b425ad4d5fbe996ba1ffe97f332ae29f41f84/src/viewer/scene/input/Input.js#L2221-L2223
... shouldn't it be...
window.removeEventListener("deviceorientation", this._deviceOrientListener);
... instead of...
window.addEventListener("deviceorientation", this._deviceOrientListener);
... as this is the object destructor?
Oh yes that's a bug. Could you make a PR?
Sure! Just wait for next week
Fixed in https://github.com/xeokit/xeokit-sdk/commit/0914d69750c7274b3a068fa0f9951f7ce3818696
In those lines of code belonging to
src/viewer/scene/Input.js
destructor...https://github.com/xeokit/xeokit-sdk/blob/1a8b425ad4d5fbe996ba1ffe97f332ae29f41f84/src/viewer/scene/input/Input.js#L2221-L2223
... shouldn't it be...
window.removeEventListener("deviceorientation", this._deviceOrientListener);
... instead of...
window.addEventListener("deviceorientation", this._deviceOrientListener);
... as this is the object destructor?