@eox/layercontrol 1.6.0 → 1.7.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 +1 -1
- package/dist/eox-layercontrol.umd.cjs +1 -1
- package/package.json +2 -2
- package/src/main.js +8 -0
- package/src/methods/layer-config/apply-updated-styles.js +1 -1
- package/types/main.d.ts +7 -0
- package/types/main.d.ts.map +1 -1
- package/types/methods/layer-config/apply-updated-styles.d.ts +7 -0
- package/types/methods/layer-config/apply-updated-styles.d.ts.map +1 -1
package/dist/eox-layercontrol.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eox/layercontrol",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@types/lodash.throttle": "^4.1.9",
|
|
12
12
|
"@types/sortablejs": "^1.15.1",
|
|
13
13
|
"ol": "^10.9.0",
|
|
14
|
-
"vite": "^8.0.
|
|
14
|
+
"vite": "^8.0.12"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
17
|
"npm": ">=8.0.0",
|
package/src/main.js
CHANGED
|
@@ -36,6 +36,12 @@ addCommonStylesheet();
|
|
|
36
36
|
*
|
|
37
37
|
* For `eox-map` attributes/properties and emitted events, see below.
|
|
38
38
|
*
|
|
39
|
+
* ## Additional Helper Methods
|
|
40
|
+
*
|
|
41
|
+
* - `updateVectorLayerStyle`: Resolves a vector layer flat style object by substituting any `["var", "<key>"]` placeholders with values from its `variables` property; imitating OL WebGL flat style variable substitution `webglLayer.updateStyleVariables`.
|
|
42
|
+
*
|
|
43
|
+
* Usage: `import { updateVectorLayerStyle } from "@eox/layercontrol";`
|
|
44
|
+
*
|
|
39
45
|
* @element eox-layercontrol
|
|
40
46
|
*/
|
|
41
47
|
export class EOxLayerControl extends LitElement {
|
|
@@ -335,4 +341,6 @@ export class EOxLayerControl extends LitElement {
|
|
|
335
341
|
`;
|
|
336
342
|
}
|
|
337
343
|
|
|
344
|
+
export { updateVectorLayerStyle } from "./methods/layer-config/apply-updated-styles";
|
|
345
|
+
|
|
338
346
|
customElements.define("eox-layercontrol", EOxLayerControl);
|
|
@@ -69,7 +69,7 @@ export const flattenObject = (obj) => {
|
|
|
69
69
|
* @param {Record<string,any>} styles
|
|
70
70
|
* @returns
|
|
71
71
|
*/
|
|
72
|
-
function updateVectorLayerStyle(styles) {
|
|
72
|
+
export function updateVectorLayerStyle(styles) {
|
|
73
73
|
// pass back flat style if contained in config
|
|
74
74
|
let returnStyle = styles;
|
|
75
75
|
// Check if variables are defined and need to be "burned in" first
|
package/types/main.d.ts
CHANGED
|
@@ -21,6 +21,12 @@
|
|
|
21
21
|
*
|
|
22
22
|
* For `eox-map` attributes/properties and emitted events, see below.
|
|
23
23
|
*
|
|
24
|
+
* ## Additional Helper Methods
|
|
25
|
+
*
|
|
26
|
+
* - `updateVectorLayerStyle`: Resolves a vector layer flat style object by substituting any `["var", "<key>"]` placeholders with values from its `variables` property; imitating OL WebGL flat style variable substitution `webglLayer.updateStyleVariables`.
|
|
27
|
+
*
|
|
28
|
+
* Usage: `import { updateVectorLayerStyle } from "@eox/layercontrol";`
|
|
29
|
+
*
|
|
24
30
|
* @element eox-layercontrol
|
|
25
31
|
*/
|
|
26
32
|
export class EOxLayerControl extends LitElement {
|
|
@@ -164,5 +170,6 @@ export class EOxLayerControl extends LitElement {
|
|
|
164
170
|
render(): import("lit-html").TemplateResult<1>;
|
|
165
171
|
#private;
|
|
166
172
|
}
|
|
173
|
+
export { updateVectorLayerStyle } from "./methods/layer-config/apply-updated-styles";
|
|
167
174
|
import { LitElement } from "lit";
|
|
168
175
|
//# sourceMappingURL=main.d.ts.map
|
package/types/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":"AAeA
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAoBE;IAaA;;;;;OAKG;IACH,KAFU,SAAO,WAAW,CAER;IAEpB;;;;OAIG;IACH,mBAAsB;IAEtB;;;;;OAKG;IACH,KAHU,OAAO,IAAI,EAAE,GAAG,CAGX;IAEf;;;;OAIG;IACH,sBAA4B;IAE5B;;;;OAIG;IACH,4BAA+B;IAE/B;;;;OAIG;IACH,OAFU,KAAK,QAAQ,CAEiD;IAExE;;;;OAIG;IACH,2BAA8B;IAE9B;;;;OAIG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,sBAAuB;IAEvB;;;;OAIG;IACH,qBAAwB;IAExB;;;;OAIG;IACH,iCAAoC;IAEpC;;;;OAIG;IACH,yBAA4B;IAE5B;;;;;;OAMG;IACH,8BAAgC;IAGlC;;;OAGG;IACH,qBAEC;IAYD,uBAIC;IARD,kBAEC;IARD,sCAIC;IAoCD,+CAqEC;;CA+CF;;2BArVgC,KAAK"}
|
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
* @param { import("../../components/layer-config").EOxLayerControlLayerConfig['layerConfig']} layerConfig
|
|
5
5
|
* */
|
|
6
6
|
export default function _default(jsonformOutput: Record<string, number>, layer: import("ol/layer/Layer").default, layerConfig: import("../../components/layer-config").EOxLayerControlLayerConfig["layerConfig"]): void;
|
|
7
|
+
/**
|
|
8
|
+
* updating the variables assigned in the layer style
|
|
9
|
+
* from the `styles.variables` property
|
|
10
|
+
* @param {Record<string,any>} styles
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export function updateVectorLayerStyle(styles: Record<string, any>): Record<string, any>;
|
|
7
14
|
export function flattenObject(obj: Record<string, any>): Record<string, any>;
|
|
8
15
|
//# sourceMappingURL=apply-updated-styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-updated-styles.d.ts","sourceRoot":"","sources":["../../../src/methods/layer-config/apply-updated-styles.js"],"names":[],"mappings":"AAAA;;;;KAIK;AACL,iDAJW,MAAM,CAAC,MAAM,EAAC,MAAM,CAAC,SACpB,OAAO,gBAAgB,EAAE,OAAO,eAChC,OAAO,+BAA+B,EAAE,0BAA0B,CAAC,aAAa,CAAC,QA+B5F;
|
|
1
|
+
{"version":3,"file":"apply-updated-styles.d.ts","sourceRoot":"","sources":["../../../src/methods/layer-config/apply-updated-styles.js"],"names":[],"mappings":"AAAA;;;;KAIK;AACL,iDAJW,MAAM,CAAC,MAAM,EAAC,MAAM,CAAC,SACpB,OAAO,gBAAgB,EAAE,OAAO,eAChC,OAAO,+BAA+B,EAAE,0BAA0B,CAAC,aAAa,CAAC,QA+B5F;AA+BD;;;;;GAKG;AACH,+CAHW,MAAM,CAAC,MAAM,EAAC,GAAG,CAAC,uBA+B5B;AA5DM,mCAFI,MAAM,CAAC,MAAM,EAAC,GAAG,CAAC,uBA0B5B"}
|