Skip to content

Commit 4d4df75

Browse files
committed
fix(core): solve configurator export bug
1 parent e1b84e6 commit 4d4df75

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@thatopen/components",
33
"description": "Collection of core functionalities to author BIM apps.",
4-
"version": "2.4.0-alpha.30",
4+
"version": "2.4.0-alpha.31",
55
"author": "That Open Company",
66
"contributors": [
77
"Antonio Gonzalez Viegas (https://github.com/agviegas)",

packages/core/src/core/ConfigManager/src/configurator.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,12 @@ export abstract class Configurator<
6969
} else if (control.type === "Vector3") {
7070
const { x, y, z } = control.value;
7171
serializedData[id] = { ...control, value: { x, y, z } };
72-
} else if (control.type === "Select" || control.type === "TextSet") {
72+
} else if (control.type === "TextSet") {
7373
const value = Array.from(control.value);
7474
serializedData[id] = { ...control, value };
75+
} else if (control.type === "Select") {
76+
const options = Array.from(control.options);
77+
serializedData[id] = { ...control, options };
7578
} else {
7679
serializedData[id] = { ...control };
7780
}
@@ -91,8 +94,10 @@ export abstract class Configurator<
9194
} else if (control.type === "Vector3") {
9295
const { x, y, z } = control.value;
9396
imported[id] = { ...control, value: new THREE.Vector3(x, y, z) };
94-
} else if (control.type === "Select" || control.type === "TextSet") {
97+
} else if (control.type === "TextSet") {
9598
imported[id] = { ...control, value: new Set(control.value) };
99+
} else if (control.type === "Select") {
100+
imported[id] = { ...control, options: new Set(control.options) };
96101
} else {
97102
imported[id] = { ...control };
98103
}

packages/front/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@thatopen/components-front",
33
"description": "Collection of frontend tools to author BIM apps.",
4-
"version": "2.4.0-alpha.30",
4+
"version": "2.4.0-alpha.31",
55
"author": "That Open Company",
66
"contributors": [
77
"Antonio Gonzalez Viegas (https://github.com/agviegas)",

0 commit comments

Comments
 (0)