UNPKG

vue-files-preview-inno

Version:

A tool for previewing files such as doc, excel, pdf, image, markdown, txt, audio, and video and so on.

41 lines (40 loc) 1.13 kB
import { qs as s, qsa as a } from "./utils/core.mjs"; class h { constructor(t) { this.interactive = "", this.fixedLayout = "", this.openToSpread = "", this.orientationLock = "", t && this.parse(t); } /** * Parse XML * @param {document} displayOptionsDocument XML * @return {DisplayOptions} self */ parse(t) { if (!t) return this; const o = s(t, "display_options"); return o ? (a(o, "option").forEach((i) => { let e = ""; switch (i.childNodes.length && (e = i.childNodes[0].nodeValue), i.attributes.name.value) { case "interactive": this.interactive = e; break; case "fixed-layout": this.fixedLayout = e; break; case "open-to-spread": this.openToSpread = e; break; case "orientation-lock": this.orientationLock = e; break; } }), this) : this; } destroy() { this.interactive = void 0, this.fixedLayout = void 0, this.openToSpread = void 0, this.orientationLock = void 0; } } export { h as default }; //# sourceMappingURL=displayoptions.mjs.map