UNPKG

mirador

Version:

An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.

41 lines (40 loc) 977 B
import { l as e, mt as t, r as n, u as r } from "./canvases-CeUwRIFA.js"; import { t as i } from "./action-types-DjIbTE-A.js"; //#region src/state/actions/canvas.js function a(e, r, a = void 0, o = {}) { return (s, c) => { let l = c(), { preserveViewport: u } = t(l).osdConfig, d = a; d ||= (n(l, { canvasId: r, windowId: e }) || []).map((e) => e.id), s({ canvasId: r, preserveViewport: o?.preserveViewport ?? u, type: i.SET_CANVAS, visibleCanvases: d, windowId: e }); }; } function o(t) { return (n, r) => { let i = r(), o = e(i, { windowId: t }), s = (o || []).map((e) => e.id); o && n(a(t, s[0], s)); }; } function s(e) { return (t, n) => { let i = n(), o = r(i, { windowId: e }), s = (o || []).map((e) => e.id); o && t(a(e, s[0], s)); }; } function c(e, t) { return { payload: t, type: i.UPDATE_VIEWPORT, windowId: e }; } //#endregion export { c as i, o as n, s as r, a as t }; //# sourceMappingURL=canvas-DYtXsw9j.js.map