@tianditu/wc
Version:
Web components for tianditu, powered by Demo Macro.
59 lines (55 loc) • 1.87 kB
JavaScript
/*!
* MIT © Demo Macro
*/
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
import { o as onload } from './use.js';
const TdtControlOverviewMap$1 = /*@__PURE__*/ proxyCustomElement(class TdtControlOverviewMap extends HTMLElement {
constructor() {
super();
this.__registerHost();
this.__attachShadow();
this.position = "bottomright";
this.isOpen = true;
this.uniqueId = undefined;
this.control = undefined;
this.map = undefined;
}
connectedCallback() {
onload(() => {
this.map = globalThis[this.uniqueId];
this.control = new T.Control.OverviewMap({
isOpen: this.isOpen,
});
this.map.addControl(this.control);
});
}
componentWillRender() {
onload(() => { });
}
render() {
return (h(Host, { key: '63eaba6d528a5dba48b3040da2d3e23eeaf4facd' }, h("slot", { key: '0b6e099b50b19bd000b0df11634bffdced2f594e' })));
}
}, [1, "tdt-control-overview-map", {
"position": [513],
"isOpen": [516, "is-open"],
"uniqueId": [513, "unique-id"],
"control": [32],
"map": [32]
}]);
function defineCustomElement$1() {
if (typeof customElements === "undefined") {
return;
}
const components = ["tdt-control-overview-map"];
components.forEach(tagName => { switch (tagName) {
case "tdt-control-overview-map":
if (!customElements.get(tagName)) {
customElements.define(tagName, TdtControlOverviewMap$1);
}
break;
} });
}
const TdtControlOverviewMap = TdtControlOverviewMap$1;
const defineCustomElement = defineCustomElement$1;
export { TdtControlOverviewMap, defineCustomElement };
//# sourceMappingURL=tdt-control-overview-map.js.map