MCPcopy Create free account
hub / github.com/SpringRoll/SpringRoll / constructor

Method constructor

src/scale-manager/ScaleManager.js:15–28  ·  view source on GitHub ↗

*Creates an instance of ScaleManager.

(callback = () => {})

Source from the content-addressed store, hash-verified

13 *Creates an instance of ScaleManager.
14 */
15 constructor(callback = () => {}) {
16 console.warn('SpringRoll.ScaleManager has been deprecated. Use SpringRoll.SafeScaleManager instead.');
17
18 this.width = 1;
19 this.height = 1;
20 this.callback = callback;
21
22 /** @private */
23 this.resizer = new ResizeHelper(this.onResize.bind(this));
24
25 if (callback instanceof Function) {
26 this.enable(callback);
27 }
28 }
29
30 /**
31 * onResize maps and passes the relevant data to the user provided callback function.

Callers

nothing calls this directly

Calls 1

enableMethod · 0.95

Tested by

no test coverage detected