()
| 366 | } |
| 367 | |
| 368 | disable() { |
| 369 | if (!this.enabled) { |
| 370 | return |
| 371 | } |
| 372 | this.enabled = false |
| 373 | |
| 374 | if (this.orientationSupport) { |
| 375 | window.removeEventListener('deviceorientation', this.onDeviceOrientation) |
| 376 | } else if (this.motionSupport) { |
| 377 | window.removeEventListener('devicemotion', this.onDeviceMotion) |
| 378 | } else { |
| 379 | window.removeEventListener('mousemove', this.onMouseMove) |
| 380 | } |
| 381 | |
| 382 | window.removeEventListener('resize', this.onWindowResize) |
| 383 | rqAnFr.cancel(this.raf) |
| 384 | } |
| 385 | |
| 386 | calibrate(x, y) { |
| 387 | this.calibrateX = x === undefined ? this.calibrateX : x |
no outgoing calls
no test coverage detected