Skip to content

Commit

Permalink
fix(core): solve configurator export bug
Browse files Browse the repository at this point in the history
  • Loading branch information
agviegas committed Nov 6, 2024
1 parent e1b84e6 commit 4d4df75
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@thatopen/components",
"description": "Collection of core functionalities to author BIM apps.",
"version": "2.4.0-alpha.30",
"version": "2.4.0-alpha.31",
"author": "That Open Company",
"contributors": [
"Antonio Gonzalez Viegas (https://github.com/agviegas)",
Expand Down
9 changes: 7 additions & 2 deletions packages/core/src/core/ConfigManager/src/configurator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ export abstract class Configurator<
} else if (control.type === "Vector3") {
const { x, y, z } = control.value;
serializedData[id] = { ...control, value: { x, y, z } };
} else if (control.type === "Select" || control.type === "TextSet") {
} else if (control.type === "TextSet") {
const value = Array.from(control.value);
serializedData[id] = { ...control, value };
} else if (control.type === "Select") {
const options = Array.from(control.options);
serializedData[id] = { ...control, options };
} else {
serializedData[id] = { ...control };
}
Expand All @@ -91,8 +94,10 @@ export abstract class Configurator<
} else if (control.type === "Vector3") {
const { x, y, z } = control.value;
imported[id] = { ...control, value: new THREE.Vector3(x, y, z) };
} else if (control.type === "Select" || control.type === "TextSet") {
} else if (control.type === "TextSet") {
imported[id] = { ...control, value: new Set(control.value) };
} else if (control.type === "Select") {
imported[id] = { ...control, options: new Set(control.options) };
} else {
imported[id] = { ...control };
}
Expand Down
2 changes: 1 addition & 1 deletion packages/front/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@thatopen/components-front",
"description": "Collection of frontend tools to author BIM apps.",
"version": "2.4.0-alpha.30",
"version": "2.4.0-alpha.31",
"author": "That Open Company",
"contributors": [
"Antonio Gonzalez Viegas (https://github.com/agviegas)",
Expand Down

0 comments on commit 4d4df75

Please sign in to comment.