@tianditu/wc
Version:
Web components for tianditu, powered by Demo Macro.
106 lines (105 loc) • 3.32 kB
JavaScript
/*!
* MIT © Demo Macro
*/
import { Host, h } from "@stencil/core";
import { onload } from "../../utils/use";
export class TdtControlOverviewMap {
constructor() {
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' })));
}
static get is() { return "tdt-control-overview-map"; }
static get encapsulation() { return "shadow"; }
static get properties() {
return {
"position": {
"type": "string",
"mutable": false,
"complexType": {
"original": "T.ControlPosition",
"resolved": "\"bottomleft\" | \"bottomright\" | \"topleft\" | \"topright\"",
"references": {
"T": {
"location": "global",
"id": "global::T"
}
}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "position",
"reflect": true,
"defaultValue": "\"bottomright\""
},
"isOpen": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "T.ControlOverviewMapOptions[\"isOpen\"]",
"resolved": "boolean | undefined",
"references": {
"T": {
"location": "global",
"id": "global::T"
}
}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "is-open",
"reflect": true,
"defaultValue": "true"
},
"uniqueId": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": true,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "unique-id",
"reflect": true
}
};
}
static get states() {
return {
"control": {},
"map": {}
};
}
}
//# sourceMappingURL=tdt-control-overview-map.js.map