MCPcopy Create free account
hub / github.com/codrops/TypeShuffleAnimation / constructor

Method constructor

src/js/typeShuffle.js:50–60  ·  view source on GitHub ↗

* Constructor. * @param {Element} DOM_el - the char element ( )

(DOM_el, {
        position,
        previousCellPosition
    } = {})

Source from the content-addressed store, hash-verified

48 * @param {Element} DOM_el - the char element (<span>)
49 */
50 constructor(DOM_el, {
51 position,
52 previousCellPosition
53 } = {}) {
54 this.DOM.el = DOM_el;
55 this.original = this.DOM.el.innerHTML;
56 this.state = this.original;
57 this.color = this.originalColor = getComputedStyle(document.documentElement).getPropertyValue('--color-text');
58 this.position = position;
59 this.previousCellPosition = previousCellPosition;
60 }
61 /**
62 * @param {string} value
63 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected