| 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 | } |