UNPKG

@tianditu/wc

Version:

Web components for tianditu, powered by Demo Macro.

66 lines (62 loc) 2.23 kB
/*! * MIT © Demo Macro */ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client'; import { o as onload, f as filterProps } from './use.js'; const TdtControlZoom$1 = /*@__PURE__*/ proxyCustomElement(class TdtControlZoom extends HTMLElement { constructor() { super(); this.__registerHost(); this.__attachShadow(); this.position = "topleft"; this.zoomInText = undefined; this.zoomInTitle = undefined; this.zoomOutText = undefined; this.zoomOutTitle = undefined; this.uniqueId = undefined; this.control = undefined; this.map = undefined; } connectedCallback() { onload(() => { this.map = globalThis[this.uniqueId]; this.control = new T.Control.Zoom(filterProps({ position: this.position, zoomInText: this.zoomInText, zoomInTitle: this.zoomInTitle, zoomOutText: this.zoomOutText, zoomOutTitle: this.zoomOutTitle, })); this.map.addControl(this.control); }); } render() { return (h(Host, { key: '773062392af8eba280a0c89174f51f29e0f7d16f' }, h("slot", { key: '244b2ba65daf8eb0e2335b68cff94dd268929347' }))); } }, [1, "tdt-control-zoom", { "position": [513], "zoomInText": [513, "zoom-in-text"], "zoomInTitle": [513, "zoom-in-title"], "zoomOutText": [513, "zoom-out-text"], "zoomOutTitle": [513, "zoom-out-title"], "uniqueId": [513, "unique-id"], "control": [32], "map": [32] }]); function defineCustomElement$1() { if (typeof customElements === "undefined") { return; } const components = ["tdt-control-zoom"]; components.forEach(tagName => { switch (tagName) { case "tdt-control-zoom": if (!customElements.get(tagName)) { customElements.define(tagName, TdtControlZoom$1); } break; } }); } const TdtControlZoom = TdtControlZoom$1; const defineCustomElement = defineCustomElement$1; export { TdtControlZoom, defineCustomElement }; //# sourceMappingURL=tdt-control-zoom.js.map