@vcmap/core 6.0.0 → 6.0.1
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/src/vcsModule.d.ts +12 -12
- package/dist/src/vcsModule.js +8 -8
- package/dist/src/vcsModule.js.map +1 -1
- package/package.json +1 -1
- package/src/vcsModule.ts +20 -20
package/dist/src/vcsModule.d.ts
CHANGED
|
@@ -10,17 +10,17 @@ import { HiddenObject } from './util/hiddenObjects.js';
|
|
|
10
10
|
import { FlightInstanceOptions } from './util/flight/flightInstance.js';
|
|
11
11
|
export type VcsModuleConfig = {
|
|
12
12
|
_id?: string | undefined;
|
|
13
|
-
name?: string |
|
|
14
|
-
description?: string |
|
|
13
|
+
name?: string | null;
|
|
14
|
+
description?: string | null;
|
|
15
15
|
properties?: Record<string, unknown>;
|
|
16
16
|
layers?: LayerOptions[];
|
|
17
17
|
maps?: VcsMapOptions[];
|
|
18
18
|
styles?: StyleItemOptions[];
|
|
19
19
|
viewpoints?: ViewpointOptions[];
|
|
20
|
-
startingViewpointName?: string;
|
|
21
|
-
startingMapName?: string;
|
|
22
|
-
startingObliqueCollectionName?: string;
|
|
23
|
-
projection?: ProjectionOptions;
|
|
20
|
+
startingViewpointName?: string | null;
|
|
21
|
+
startingMapName?: string | null;
|
|
22
|
+
startingObliqueCollectionName?: string | null;
|
|
23
|
+
projection?: ProjectionOptions | null;
|
|
24
24
|
obliqueCollections?: ObliqueCollectionOptions[];
|
|
25
25
|
categories?: {
|
|
26
26
|
name: string;
|
|
@@ -47,13 +47,13 @@ export declare function markVolatile(object: object & {
|
|
|
47
47
|
*/
|
|
48
48
|
declare class VcsModule {
|
|
49
49
|
private _uuid;
|
|
50
|
-
name: string;
|
|
51
|
-
description: string | undefined;
|
|
50
|
+
name: string | null;
|
|
51
|
+
description: string | undefined | null;
|
|
52
52
|
properties: Record<string, unknown> | undefined;
|
|
53
|
-
startingViewpointName: string | undefined;
|
|
54
|
-
startingMapName: string | undefined;
|
|
55
|
-
startingObliqueCollectionName: string | undefined;
|
|
56
|
-
projection: Projection | undefined;
|
|
53
|
+
startingViewpointName: string | undefined | null;
|
|
54
|
+
startingMapName: string | undefined | null;
|
|
55
|
+
startingObliqueCollectionName: string | undefined | null;
|
|
56
|
+
projection: Projection | undefined | null;
|
|
57
57
|
private _config;
|
|
58
58
|
/**
|
|
59
59
|
* @param config
|
package/dist/src/vcsModule.js
CHANGED
|
@@ -47,7 +47,7 @@ class VcsModule {
|
|
|
47
47
|
return this._uuid;
|
|
48
48
|
}
|
|
49
49
|
get config() {
|
|
50
|
-
return
|
|
50
|
+
return structuredClone(this._config);
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* Sets the config object by serializing all runtime objects of the current app.
|
|
@@ -61,23 +61,23 @@ class VcsModule {
|
|
|
61
61
|
if (this._config._id) {
|
|
62
62
|
config._id = this._config._id;
|
|
63
63
|
}
|
|
64
|
-
if (this.name) {
|
|
64
|
+
if (this.name !== undefined) {
|
|
65
65
|
config.name = this.name;
|
|
66
66
|
}
|
|
67
|
-
if (this.description
|
|
67
|
+
if (this.description !== undefined) {
|
|
68
68
|
config.description = this.description;
|
|
69
69
|
}
|
|
70
|
-
if (this.startingViewpointName
|
|
70
|
+
if (this.startingViewpointName !== undefined) {
|
|
71
71
|
config.startingViewpointName = this.startingViewpointName;
|
|
72
72
|
}
|
|
73
|
-
if (this.startingMapName
|
|
73
|
+
if (this.startingMapName !== undefined) {
|
|
74
74
|
config.startingMapName = this.startingMapName;
|
|
75
75
|
}
|
|
76
|
-
if (this.startingObliqueCollectionName
|
|
76
|
+
if (this.startingObliqueCollectionName !== undefined) {
|
|
77
77
|
config.startingObliqueCollectionName = this.startingObliqueCollectionName;
|
|
78
78
|
}
|
|
79
|
-
if (this.projection
|
|
80
|
-
config.projection = this.projection?.toJSON();
|
|
79
|
+
if (this.projection !== undefined) {
|
|
80
|
+
config.projection = this.projection?.toJSON() ?? null;
|
|
81
81
|
}
|
|
82
82
|
return config;
|
|
83
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vcsModule.js","sourceRoot":"","sources":["../../src/vcsModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,UAAsC,MAAM,sBAAsB,CAAC;AAO1E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAuBrD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,EAAE,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAC1B,MAA8C;IAE9C,MAAM,CAAC,cAAc,CAAC,GAAG,gBAAgB,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,SAAS;IACL,KAAK,CAAS;IAEtB,IAAI,
|
|
1
|
+
{"version":3,"file":"vcsModule.js","sourceRoot":"","sources":["../../src/vcsModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,UAAsC,MAAM,sBAAsB,CAAC;AAO1E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAuBrD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,EAAE,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAC1B,MAA8C;IAE9C,MAAM,CAAC,cAAc,CAAC,GAAG,gBAAgB,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,SAAS;IACL,KAAK,CAAS;IAEtB,IAAI,CAAgB;IAEpB,WAAW,CAA4B;IAEvC,UAAU,CAAsC;IAEhD,qBAAqB,CAA4B;IAEjD,eAAe,CAA4B;IAE3C,6BAA6B,CAA4B;IAEzD,UAAU,CAAgC;IAElC,OAAO,CAAkB;IAEjC;;OAEG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,KAAK,GAAG,MA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AI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACnC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACxC,CAAC;QACD,IAAI,IAAI,CAAC,qBAAqB,KAAK,SAAS,EAAE,CAAC;YAC7C,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC;QAC5D,CAAC;QACD,IAAI,IAAI,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;YACvC,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAChD,CAAC;QACD,IAAI,IAAI,CAAC,6BAA6B,KAAK,SAAS,EAAE,CAAC;YACrD,MAAM,CAAC,6BAA6B,GAAG,IAAI,CAAC,6BAA6B,CAAC;QAC5E,CAAC;QACD,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,IAAI,CAAC;QACxD,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAED,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
package/src/vcsModule.ts
CHANGED
|
@@ -12,17 +12,17 @@ import { FlightInstanceOptions } from './util/flight/flightInstance.js';
|
|
|
12
12
|
|
|
13
13
|
export type VcsModuleConfig = {
|
|
14
14
|
_id?: string | undefined;
|
|
15
|
-
name?: string |
|
|
16
|
-
description?: string |
|
|
15
|
+
name?: string | null;
|
|
16
|
+
description?: string | null;
|
|
17
17
|
properties?: Record<string, unknown>;
|
|
18
18
|
layers?: LayerOptions[];
|
|
19
19
|
maps?: VcsMapOptions[];
|
|
20
20
|
styles?: StyleItemOptions[];
|
|
21
21
|
viewpoints?: ViewpointOptions[];
|
|
22
|
-
startingViewpointName?: string;
|
|
23
|
-
startingMapName?: string;
|
|
24
|
-
startingObliqueCollectionName?: string;
|
|
25
|
-
projection?: ProjectionOptions;
|
|
22
|
+
startingViewpointName?: string | null;
|
|
23
|
+
startingMapName?: string | null;
|
|
24
|
+
startingObliqueCollectionName?: string | null;
|
|
25
|
+
projection?: ProjectionOptions | null;
|
|
26
26
|
obliqueCollections?: ObliqueCollectionOptions[];
|
|
27
27
|
categories?: { name: string; items: object[] }[];
|
|
28
28
|
hiddenObjects?: HiddenObject[];
|
|
@@ -52,19 +52,19 @@ export function markVolatile(
|
|
|
52
52
|
class VcsModule {
|
|
53
53
|
private _uuid: string;
|
|
54
54
|
|
|
55
|
-
name: string;
|
|
55
|
+
name: string | null;
|
|
56
56
|
|
|
57
|
-
description: string | undefined;
|
|
57
|
+
description: string | undefined | null;
|
|
58
58
|
|
|
59
59
|
properties: Record<string, unknown> | undefined;
|
|
60
60
|
|
|
61
|
-
startingViewpointName: string | undefined;
|
|
61
|
+
startingViewpointName: string | undefined | null;
|
|
62
62
|
|
|
63
|
-
startingMapName: string | undefined;
|
|
63
|
+
startingMapName: string | undefined | null;
|
|
64
64
|
|
|
65
|
-
startingObliqueCollectionName: string | undefined;
|
|
65
|
+
startingObliqueCollectionName: string | undefined | null;
|
|
66
66
|
|
|
67
|
-
projection: Projection | undefined;
|
|
67
|
+
projection: Projection | undefined | null;
|
|
68
68
|
|
|
69
69
|
private _config: VcsModuleConfig;
|
|
70
70
|
|
|
@@ -90,7 +90,7 @@ class VcsModule {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
get config(): VcsModuleConfig {
|
|
93
|
-
return
|
|
93
|
+
return structuredClone(this._config);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
/**
|
|
@@ -106,23 +106,23 @@ class VcsModule {
|
|
|
106
106
|
if (this._config._id) {
|
|
107
107
|
config._id = this._config._id;
|
|
108
108
|
}
|
|
109
|
-
if (this.name) {
|
|
109
|
+
if (this.name !== undefined) {
|
|
110
110
|
config.name = this.name;
|
|
111
111
|
}
|
|
112
|
-
if (this.description
|
|
112
|
+
if (this.description !== undefined) {
|
|
113
113
|
config.description = this.description;
|
|
114
114
|
}
|
|
115
|
-
if (this.startingViewpointName
|
|
115
|
+
if (this.startingViewpointName !== undefined) {
|
|
116
116
|
config.startingViewpointName = this.startingViewpointName;
|
|
117
117
|
}
|
|
118
|
-
if (this.startingMapName
|
|
118
|
+
if (this.startingMapName !== undefined) {
|
|
119
119
|
config.startingMapName = this.startingMapName;
|
|
120
120
|
}
|
|
121
|
-
if (this.startingObliqueCollectionName
|
|
121
|
+
if (this.startingObliqueCollectionName !== undefined) {
|
|
122
122
|
config.startingObliqueCollectionName = this.startingObliqueCollectionName;
|
|
123
123
|
}
|
|
124
|
-
if (this.projection
|
|
125
|
-
config.projection = this.projection?.toJSON();
|
|
124
|
+
if (this.projection !== undefined) {
|
|
125
|
+
config.projection = this.projection?.toJSON() ?? null;
|
|
126
126
|
}
|
|
127
127
|
return config;
|
|
128
128
|
}
|