MCPcopy
hub / github.com/wagerfield/parallax / disable

Method disable

src/parallax.js:368–384  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 3

onOrientationTimerMethod · 0.95
onMotionTimerMethod · 0.95
destroyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected