MCPcopy
hub / github.com/greensock/GSAP / revert

Method revert

esm/SplitText.js:299–314  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

297 _fonts == null ? void 0 : _fonts.removeEventListener("loadingdone", this._split);
298 }
299 revert() {
300 var _a, _b;
301 if (this.isSplit) {
302 let { orig, anim } = this._data;
303 this.kill();
304 orig.forEach(_revertOriginal);
305 this.chars.length = this.words.length = this.lines.length = orig.length = this.masks.length = 0;
306 this.isSplit = false;
307 if (anim) {
308 this._data.animTime = anim.totalTime();
309 anim.revert();
310 }
311 (_b = (_a = this.vars).onRevert) == null ? void 0 : _b.call(_a, this);
312 }
313 return this;
314 }
315 static create(elements, config) {
316 return new _SplitText(elements, config);
317 }

Callers 1

splitMethod · 0.95

Calls 4

killMethod · 0.95
callMethod · 0.80
revertMethod · 0.65
totalTimeMethod · 0.45

Tested by

no test coverage detected