UNPKG

theophile

Version:

A templating module that transforms a web page into a (Powerpoint-like) presentation

29 lines (27 loc) 659 B
import Transition from "./Transition.js"; export default class TransitionNone extends Transition { constructor(original, replacement, type) { super(original, replacement, type); } cancel() { } prepare(resolve) { super.prepare(); this.replacement.style.position = "absolute"; this.original.style.position = "absolute"; resolve(); } clean() { super.clean(); this.replacement.style.removeProperty("position"); this.original.style.removeProperty("position"); } async go() { return (this.promise = new Promise(resolve => { this.prepare(resolve); }).then(e => { this.clean(); return e; })); } }