@eox/layercontrol 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +94 -89
- package/dist/eox-layercontrol.umd.cjs +13 -11
- package/package.json +1 -1
- package/src/components/layer-datetime.js +23 -4
- package/types/layercontrol/src/components/layer-datetime.d.ts +2 -0
- package/types/layercontrol/src/components/layer-datetime.d.ts.map +1 -1
- package/types/map/src/helpers/select.d.ts.map +1 -1
- package/types/map/src/plugins/globe/methods.d.ts.map +1 -1
- package/types/map/src/plugins/globe/openglobus.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -45,6 +45,7 @@ export class EOxLayerControlLayerDatetime extends LitElement {
|
|
|
45
45
|
* currentStep: string|number;
|
|
46
46
|
* controlValues: (string|number)[];
|
|
47
47
|
* displayFormat?: string;
|
|
48
|
+
* animateOnClickInterval?: string;
|
|
48
49
|
* }}
|
|
49
50
|
*/
|
|
50
51
|
this.layerDatetime = null;
|
|
@@ -72,9 +73,24 @@ export class EOxLayerControlLayerDatetime extends LitElement {
|
|
|
72
73
|
* @param {CustomEvent<{date:string[]}>} evt
|
|
73
74
|
**/
|
|
74
75
|
#handleStepChange(evt) {
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
const dateObj = new Date(evt.detail.date[0]);
|
|
77
|
+
|
|
78
|
+
// Check if configuration implies datetime (ISO strings)
|
|
79
|
+
const isDatetimeConfig = this.layerDatetime.controlValues?.some(
|
|
80
|
+
(v) => typeof v === "string" && v.includes("T"),
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
let currentStep;
|
|
84
|
+
if (isDatetimeConfig) {
|
|
85
|
+
currentStep = dateObj.toISOString();
|
|
86
|
+
} else {
|
|
87
|
+
const formatDate = (d) =>
|
|
88
|
+
`${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
|
89
|
+
currentStep = formatDate(dateObj);
|
|
90
|
+
}
|
|
91
|
+
if (currentStep === this.layerDatetime.currentStep) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
78
94
|
|
|
79
95
|
this.dispatchEvent(
|
|
80
96
|
new CustomEvent("datetime:updated", {
|
|
@@ -126,7 +142,10 @@ export class EOxLayerControlLayerDatetime extends LitElement {
|
|
|
126
142
|
.navigation=${this.layerDatetime.navigation ?? false}
|
|
127
143
|
.format=${this.layerDatetime.displayFormat}
|
|
128
144
|
></eox-timecontrol-date>
|
|
129
|
-
<eox-timecontrol-slider
|
|
145
|
+
<eox-timecontrol-slider
|
|
146
|
+
animate-onclick-interval="${this.layerDatetime
|
|
147
|
+
.animateOnClickInterval ?? "0.3s"}"
|
|
148
|
+
></eox-timecontrol-slider>
|
|
130
149
|
</eox-timecontrol>
|
|
131
150
|
`,
|
|
132
151
|
)}
|
|
@@ -43,6 +43,7 @@ export class EOxLayerControlLayerDatetime extends LitElement {
|
|
|
43
43
|
* currentStep: string|number;
|
|
44
44
|
* controlValues: (string|number)[];
|
|
45
45
|
* displayFormat?: string;
|
|
46
|
+
* animateOnClickInterval?: string;
|
|
46
47
|
* }}
|
|
47
48
|
*/
|
|
48
49
|
layerDatetime: {
|
|
@@ -52,6 +53,7 @@ export class EOxLayerControlLayerDatetime extends LitElement {
|
|
|
52
53
|
currentStep: string | number;
|
|
53
54
|
controlValues: (string | number)[];
|
|
54
55
|
displayFormat?: string;
|
|
56
|
+
animateOnClickInterval?: string;
|
|
55
57
|
};
|
|
56
58
|
/**
|
|
57
59
|
* The native OL layer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer-datetime.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-datetime.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH;IAEE;;;;;;;;;;;;;MAKE;IAKA;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAErB
|
|
1
|
+
{"version":3,"file":"layer-datetime.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-datetime.js"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH;IAEE;;;;;;;;;;;;;MAKE;IAKA;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAErB;;;;;;;;;;;;OAYG;IACH,eAVU;QACL,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,WAAW,EAAE,MAAM,GAAC,MAAM,CAAC;QAC3B,aAAa,EAAE,CAAC,MAAM,GAAC,MAAM,CAAC,EAAE,CAAC;QACjC,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;KACjC,CAEqB;IAEzB;;;;;OAKG;IACH,OAHU,OAAO,UAAU,EAAE,KAAK,CAGjB;IAkDnB;;OAEG;IACH,+CAyCC;;CAIF;2BA5JgC,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/select.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/select.js"],"names":[],"mappings":"AA6hBA;;;;;;;;;GASG;AACH,kCAPW,MAAM,eACN,WAAW,WACX,aAAa,GAAG,WAAW,GACzB,oBAAoB,CAgBhC;AApiBD;;;;;;;;GAQG;AAEH;;;;GAIG;AACH;IACE;;;;OAIG;IACH,oBAJW,MAAM,YACN,OAAO,UAAU,EAAE,WAAW,WAC9B,aAAa,EAmZvB;IAhZC,iCAAoB;IACpB,4NAA2B;IAC3B,0CAAsB;IACtB,gBAAqD;IACrD,eAAmC;IACnC,iBAAuD;IAUnD,wBAAkD;IAgFpD,oCAAoC;IACpC,cADW,KAAK,CAAC,MAAM,GAAC,MAAM,CAAC,CACT;IAuBtB,+MAGG;IAuBH;;;UAGM;IACN,kBAsMW,OAAO,oBAAoB,EAAE,OAAO,UAjJ9C;IAiBD,iCAGC;IAoBD;;;;OAIG;IACH,sCAgBC;IA2IL;;;OAGG;IACH,kBAFW,OAAO,QAIjB;IAED;;;;OAIG;IACH,iBAAkB,iBAHP,OAAO,GAAG,aAAa,GAAG,OAAO,WAAW,EAAE,MAGxB,EAAE,aAAO,UAOxC;IAEF;;;;OAIG;IACH,mBAHW,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,0BAkChC;IAED;;OAEG;IACH,eAWC;IAED;;;;;OAKG;IACH,eAJW,OAAO,GAAG,aAAa,GACrB,MAAM,GAAG,MAAM,CAoB3B;CACF;qBA3gBY,OAAO,SAAS,EAAE,MAAM;uBACxB,OAAO,WAAW,EAAE,QAAQ;0BAC5B,OAAO,UAAU,EAAE,WAAW;uBAC9B,OAAO,UAAU,EAAE,QAAQ;sCAC3B,OAAO,UAAU,EAAE,uBAAuB;4BAC1C,OAAO,UAAU,EAAE,aAAa;0BAChC,OAAO,UAAU,EAAE,WAAW;wBAjBnB,iBAAiB;uBAGlB,qBAAqB;oBALxB,YAAY;0BACN,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"methods.d.ts","sourceRoot":"","sources":["../../../../../../map/src/plugins/globe/methods.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"methods.d.ts","sourceRoot":"","sources":["../../../../../../map/src/plugins/globe/methods.js"],"names":[],"mappings":"AAgIA,oGA6BC;AAxJM;;;;IAoCN;8BAtCa,OAAO,SAAS,EAAE,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openglobus.d.ts","sourceRoot":"","sources":["../../../../../../map/src/plugins/globe/openglobus.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"openglobus.d.ts","sourceRoot":"","sources":["../../../../../../map/src/plugins/globe/openglobus.js"],"names":[],"mappings":"AAwBO;;;;YAuCN;AAEM,qCAWN;AAEM,iFA4HN;AAEM,4CAyBN;AAEM,6CAgEN;AA0BM,6CAJI,eAAe,SACf,OAAO,gBAAgB,EAAE,KAAK,WAC9B,KAAK,CAAC,GAAG,CAAC,QAyCpB;AAOM,sCAJI,OAAO,eAAe,EAAE,OAAO,CAAC,OAAO,eAAe,EAAE,OAAO,CAAC,SAChE,OAAO,gBAAgB,EAAE,KAAK,WAC9B,KAAK,CAAC,GAAG,CAAC,QAmBpB;8BA5Wa,OAAO,SAAS,EAAE,eAAe;iCAVxC,gBAAgB;oBAAhB,gBAAgB;4BAAhB,gBAAgB"}
|