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

Method initialise

src/parallax.js:250–276  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

248 }
249
250 initialise() {
251 if (this.transform2DSupport === undefined) {
252 this.transform2DSupport = helpers.transformSupport('2D')
253 this.transform3DSupport = helpers.transformSupport('3D')
254 }
255
256 // Configure Context Styles
257 if (this.transform3DSupport) {
258 helpers.accelerate(this.element)
259 }
260
261 let style = window.getComputedStyle(this.element)
262 if (style.getPropertyValue('position') === 'static') {
263 this.element.style.position = 'relative'
264 }
265
266 // Pointer events
267 if(!this.pointerEvents) {
268 this.element.style.pointerEvents = 'none'
269 }
270
271 // Setup
272 this.updateLayers()
273 this.updateDimensions()
274 this.enable()
275 this.queueCalibration(this.calibrationDelay)
276 }
277
278 doReadyCallback() {
279 if(this.onReady) {

Callers 1

constructorMethod · 0.95

Calls 4

updateLayersMethod · 0.95
updateDimensionsMethod · 0.95
enableMethod · 0.95
queueCalibrationMethod · 0.95

Tested by

no test coverage detected