@geode/opengeodeweb-front 10.6.2 → 10.6.3-rc.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/.eslintrc.cjs +1 -1
- package/.oxlintrc.json +3 -22
- package/app/assets/geode_objects.js +26 -26
- package/app/components/Carousel.vue +62 -66
- package/app/components/CrsSelector.vue +48 -52
- package/app/components/DeleteDialog.vue +21 -37
- package/app/components/DragAndDrop.vue +35 -41
- package/app/components/ExtensionSelector.vue +50 -63
- package/app/components/FeedBack/ErrorBanner.vue +7 -10
- package/app/components/FeedBack/Snackers.vue +12 -14
- package/app/components/FetchingData.vue +1 -6
- package/app/components/FileSelector.vue +41 -47
- package/app/components/FileUploader.vue +62 -79
- package/app/components/GlassCard.vue +19 -19
- package/app/components/HybridRenderingView.vue +37 -38
- package/app/components/InfraConnected.vue +3 -3
- package/app/components/Inspector/InspectionButton.vue +27 -31
- package/app/components/Inspector/ResultPanel.vue +13 -24
- package/app/components/Launcher.vue +13 -13
- package/app/components/Loading.vue +63 -69
- package/app/components/MissingFilesSelector.vue +53 -73
- package/app/components/ObjectSelector.vue +81 -99
- package/app/components/PackagesVersions.vue +27 -30
- package/app/components/Recaptcha.vue +60 -71
- package/app/components/RemoteRenderingView.vue +102 -108
- package/app/components/Screenshot.vue +36 -42
- package/app/components/SearchBar.vue +5 -5
- package/app/components/Step.vue +37 -44
- package/app/components/Stepper.vue +29 -35
- package/app/components/VeaseViewToolbar.vue +69 -78
- package/app/components/ViewToolbar.vue +41 -45
- package/app/components/Viewer/BreadCrumb.vue +18 -30
- package/app/components/Viewer/ContextMenu.vue +176 -179
- package/app/components/Viewer/ContextMenuItem.vue +105 -117
- package/app/components/Viewer/EdgedCurve/PointsOptions.vue +6 -9
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +82 -93
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +84 -99
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +83 -98
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +62 -73
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +84 -108
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +82 -105
- package/app/components/Viewer/Generic/Model/EdgesOptions.vue +19 -23
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +26 -30
- package/app/components/Viewer/Grid/2D/CellsOptions.vue +5 -5
- package/app/components/Viewer/Grid/2D/EdgesOptions.vue +6 -9
- package/app/components/Viewer/Grid/2D/PointsOptions.vue +6 -9
- package/app/components/Viewer/Grid/3D/CellsOptions.vue +5 -5
- package/app/components/Viewer/Grid/3D/EdgesOptions.vue +6 -9
- package/app/components/Viewer/Grid/3D/FacetsOptions.vue +5 -5
- package/app/components/Viewer/Grid/3D/PointsOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/EdgesOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/PointsOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/PolygonsOptions.vue +6 -9
- package/app/components/Viewer/HybridSolid/PolyhedraOptions.vue +6 -9
- package/app/components/Viewer/Options/AttributeColorBar.vue +8 -8
- package/app/components/Viewer/Options/AttributeSelector.vue +73 -78
- package/app/components/Viewer/Options/ColorMapList.vue +115 -140
- package/app/components/Viewer/Options/ColorMapPicker.vue +128 -142
- package/app/components/Viewer/Options/ColorPicker.vue +9 -9
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +77 -91
- package/app/components/Viewer/Options/TextureItem.vue +54 -58
- package/app/components/Viewer/Options/TexturesSelector.vue +22 -26
- package/app/components/Viewer/Options/VisibilitySwitch.vue +1 -1
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +61 -68
- package/app/components/Viewer/PolygonalSurface/EdgesOptions.vue +6 -9
- package/app/components/Viewer/PolygonalSurface/PointsOptions.vue +6 -9
- package/app/components/Viewer/PolygonalSurface/SpecificPolygonsOptions.vue +83 -103
- package/app/components/Viewer/Solid/EdgesOptions.vue +6 -9
- package/app/components/Viewer/Solid/PointsOptions.vue +6 -9
- package/app/components/Viewer/Solid/PolygonsOptions.vue +6 -9
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +82 -105
- package/app/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +5 -5
- package/app/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +5 -5
- package/app/components/Viewer/Tree/ObjectTree.vue +80 -89
- package/app/components/Viewer/TreeComponent.vue +43 -49
- package/app/components/Viewer/TreeObject.vue +48 -50
- package/app/components/Viewer/TriangulatedSurface/EdgesOptions.vue +6 -9
- package/app/components/Viewer/TriangulatedSurface/PointsOptions.vue +5 -5
- package/app/components/Viewer/TriangulatedSurface/TrianglesOptions.vue +5 -5
- package/app/components/Wrapper.vue +8 -8
- package/app/components/ZScaling.vue +18 -27
- package/app/composables/project_manager.js +57 -67
- package/app/composables/run_function_when_microservices_connected.js +8 -8
- package/app/plugins/auto_store_register.js +11 -13
- package/app/stores/app.js +118 -138
- package/app/stores/data.js +52 -68
- package/app/stores/data_style.js +36 -36
- package/app/stores/feedback.js +17 -20
- package/app/stores/geode.js +54 -55
- package/app/stores/hybrid_viewer.js +164 -177
- package/app/stores/infra.js +45 -55
- package/app/stores/lambda.js +26 -26
- package/app/stores/menu.js +78 -85
- package/app/stores/treeview.js +57 -65
- package/app/stores/viewer.js +92 -104
- package/app/utils/colormap.js +3 -3
- package/app/utils/config.js +16 -22
- package/app/utils/default_styles.js +50 -62
- package/app/utils/extension.js +44 -44
- package/app/utils/file_import_workflow.js +50 -64
- package/app/utils/local/app_mode.js +2 -2
- package/app/utils/local/cleanup.js +66 -72
- package/app/utils/local/microservices.js +61 -71
- package/app/utils/local/path.js +16 -19
- package/app/utils/local/scripts.js +22 -22
- package/app/utils/recaptcha.js +6 -6
- package/app/utils/server.js +21 -24
- package/app/utils/status.js +2 -2
- package/app/utils/treeview.js +4 -4
- package/app/utils/validate_schema.js +7 -7
- package/commitlint.config.js +2 -2
- package/eslint.config.js +4 -4
- package/internal/database/database.js +38 -46
- package/internal/database/extended_database.js +9 -10
- package/internal/database/tables/data.js +2 -3
- package/internal/database/tables/model_components.js +1 -1
- package/internal/database/tables/model_components_relation.js +1 -1
- package/internal/stores/data_style/mesh/cells/cell.js +47 -63
- package/internal/stores/data_style/mesh/cells/color.js +11 -16
- package/internal/stores/data_style/mesh/cells/common.js +6 -6
- package/internal/stores/data_style/mesh/cells/index.js +37 -47
- package/internal/stores/data_style/mesh/cells/textures.js +11 -12
- package/internal/stores/data_style/mesh/cells/vertex.js +47 -58
- package/internal/stores/data_style/mesh/cells/visibility.js +11 -16
- package/internal/stores/data_style/mesh/edges/color.js +11 -16
- package/internal/stores/data_style/mesh/edges/common.js +6 -6
- package/internal/stores/data_style/mesh/edges/edge.js +47 -63
- package/internal/stores/data_style/mesh/edges/index.js +38 -52
- package/internal/stores/data_style/mesh/edges/vertex.js +47 -58
- package/internal/stores/data_style/mesh/edges/visibility.js +11 -16
- package/internal/stores/data_style/mesh/edges/width.js +11 -16
- package/internal/stores/data_style/mesh/index.js +34 -34
- package/internal/stores/data_style/mesh/points/color.js +11 -16
- package/internal/stores/data_style/mesh/points/common.js +6 -6
- package/internal/stores/data_style/mesh/points/index.js +35 -49
- package/internal/stores/data_style/mesh/points/size.js +11 -16
- package/internal/stores/data_style/mesh/points/vertex.js +47 -58
- package/internal/stores/data_style/mesh/points/visibility.js +11 -16
- package/internal/stores/data_style/mesh/polygons/color.js +11 -16
- package/internal/stores/data_style/mesh/polygons/common.js +6 -6
- package/internal/stores/data_style/mesh/polygons/index.js +36 -45
- package/internal/stores/data_style/mesh/polygons/polygon.js +45 -56
- package/internal/stores/data_style/mesh/polygons/textures.js +11 -16
- package/internal/stores/data_style/mesh/polygons/vertex.js +47 -58
- package/internal/stores/data_style/mesh/polygons/visibility.js +11 -16
- package/internal/stores/data_style/mesh/polyhedra/color.js +11 -16
- package/internal/stores/data_style/mesh/polyhedra/common.js +6 -6
- package/internal/stores/data_style/mesh/polyhedra/index.js +29 -42
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +43 -47
- package/internal/stores/data_style/mesh/polyhedra/vertex.js +47 -58
- package/internal/stores/data_style/mesh/polyhedra/visibility.js +11 -17
- package/internal/stores/data_style/model/blocks/color.js +21 -24
- package/internal/stores/data_style/model/blocks/common.js +6 -6
- package/internal/stores/data_style/model/blocks/index.js +13 -17
- package/internal/stores/data_style/model/blocks/visibility.js +21 -24
- package/internal/stores/data_style/model/corners/color.js +21 -24
- package/internal/stores/data_style/model/corners/common.js +6 -6
- package/internal/stores/data_style/model/corners/index.js +14 -18
- package/internal/stores/data_style/model/corners/visibility.js +21 -25
- package/internal/stores/data_style/model/edges/common.js +4 -4
- package/internal/stores/data_style/model/edges/index.js +7 -7
- package/internal/stores/data_style/model/edges/visibility.js +11 -15
- package/internal/stores/data_style/model/index.js +84 -100
- package/internal/stores/data_style/model/lines/color.js +21 -24
- package/internal/stores/data_style/model/lines/common.js +6 -6
- package/internal/stores/data_style/model/lines/index.js +13 -17
- package/internal/stores/data_style/model/lines/visibility.js +21 -24
- package/internal/stores/data_style/model/points/common.js +4 -4
- package/internal/stores/data_style/model/points/index.js +9 -9
- package/internal/stores/data_style/model/points/size.js +11 -11
- package/internal/stores/data_style/model/points/visibility.js +11 -15
- package/internal/stores/data_style/model/surfaces/color.js +21 -24
- package/internal/stores/data_style/model/surfaces/common.js +6 -6
- package/internal/stores/data_style/model/surfaces/index.js +14 -22
- package/internal/stores/data_style/model/surfaces/visibility.js +18 -22
- package/internal/stores/data_style/state.js +11 -11
- package/internal/utils/api_fetch.js +24 -34
- package/internal/utils/upload_file.js +19 -24
- package/internal/utils/viewer_call.js +23 -36
- package/nuxt.config.js +7 -11
- package/package.json +3 -3
- package/scripts/generate_geode_objects.js +14 -16
- package/server/api/app/kill.post.js +4 -4
- package/server/api/app/project_folder_path.post.js +11 -11
- package/server/api/app/run_back.post.js +12 -12
- package/server/api/app/run_viewer.post.js +12 -12
- package/server/api/extensions/run.post.js +34 -41
- package/server/api/extensions/upload.put.js +48 -62
- package/tests/integration/setup.js +43 -53
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +90 -116
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +81 -107
- package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +38 -41
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +85 -101
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +89 -113
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +81 -105
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +56 -73
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +59 -76
- package/tests/integration/stores/data_style/model/edges.nuxt.test.js +39 -42
- package/tests/integration/stores/data_style/model/index.nuxt.test.js +31 -34
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +60 -73
- package/tests/integration/stores/data_style/model/points.nuxt.test.js +52 -55
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +59 -80
- package/tests/integration/stores/viewer.nuxt.test.js +35 -38
- package/tests/setup_indexeddb.js +2 -2
- package/tests/unit/components/CrsSelector.nuxt.test.js +28 -28
- package/tests/unit/components/ExtensionSelector.nuxt.test.js +33 -35
- package/tests/unit/components/FeedBack/ErrorsBanner.nuxt.test.js +23 -23
- package/tests/unit/components/FeedBack/Snackers.nuxt.test.js +18 -18
- package/tests/unit/components/FileSelector.nuxt.test.js +57 -59
- package/tests/unit/components/FileUploader.nuxt.test.js +35 -39
- package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +28 -28
- package/tests/unit/components/Inspector/ResultPanel.nuxt.test.js +22 -27
- package/tests/unit/components/Launcher.nuxt.test.js +20 -22
- package/tests/unit/components/MissingFilesSelector.nuxt.test.js +37 -37
- package/tests/unit/components/ObjectSelector.nuxt.test.js +62 -62
- package/tests/unit/components/PackagesVersions.nuxt.test.js +16 -16
- package/tests/unit/components/Step.nuxt.test.js +18 -19
- package/tests/unit/components/Stepper.nuxt.test.js +18 -18
- package/tests/unit/composables/api_fetch.nuxt.test.js +34 -36
- package/tests/unit/composables/project_manager.nuxt.test.js +93 -112
- package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +36 -36
- package/tests/unit/composables/upload_file.nuxt.test.js +27 -29
- package/tests/unit/plugins/project_load.nuxt.test.js +31 -33
- package/tests/unit/stores/app.nuxt.test.js +90 -92
- package/tests/unit/stores/feedback.nuxt.test.js +47 -57
- package/tests/unit/stores/geode.nuxt.test.js +111 -115
- package/tests/unit/stores/infra.nuxt.test.js +148 -148
- package/tests/unit/stores/lambda.nuxt.test.js +72 -74
- package/tests/unit/stores/treeview.nuxt.test.js +19 -21
- package/tests/unit/stores/viewer.nuxt.test.js +109 -122
- package/tests/unit/utils/recaptcha.nuxt.test.js +25 -29
- package/tests/unit/utils/validate_schema.nuxt.test.js +17 -17
- package/tests/utils.js +11 -11
- package/tests/vitest.config.js +9 -9
- package/vuetify_config.js +2 -2
|
@@ -1,130 +1,119 @@
|
|
|
1
1
|
// Third party imports
|
|
2
|
-
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
2
|
+
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json";
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
|
-
import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap"
|
|
6
|
-
import { useMeshPointsCommonStyle } from "./common"
|
|
7
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
5
|
+
import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap";
|
|
6
|
+
import { useMeshPointsCommonStyle } from "./common";
|
|
7
|
+
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
8
8
|
|
|
9
9
|
// Local constants
|
|
10
10
|
const meshPointsVertexAttributeSchemas =
|
|
11
|
-
viewer_schemas.opengeodeweb_viewer.mesh.points.attribute.vertex
|
|
11
|
+
viewer_schemas.opengeodeweb_viewer.mesh.points.attribute.vertex;
|
|
12
12
|
|
|
13
13
|
export function useMeshPointsVertexAttributeStyle() {
|
|
14
|
-
const viewerStore = useViewerStore()
|
|
15
|
-
const meshPointsCommonStyle = useMeshPointsCommonStyle()
|
|
14
|
+
const viewerStore = useViewerStore();
|
|
15
|
+
const meshPointsCommonStyle = useMeshPointsCommonStyle();
|
|
16
16
|
|
|
17
17
|
function meshPointsVertexAttribute(id) {
|
|
18
|
-
return meshPointsCommonStyle.meshPointsColoring(id).vertex
|
|
18
|
+
return meshPointsCommonStyle.meshPointsColoring(id).vertex;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function meshPointsVertexAttributeStoredConfig(id, name) {
|
|
22
|
-
const { storedConfigs } = meshPointsVertexAttribute(id)
|
|
22
|
+
const { storedConfigs } = meshPointsVertexAttribute(id);
|
|
23
23
|
if (name in storedConfigs) {
|
|
24
|
-
return storedConfigs[name]
|
|
24
|
+
return storedConfigs[name];
|
|
25
25
|
}
|
|
26
26
|
return setMeshPointsVertexAttributeStoredConfig(id, name, {
|
|
27
27
|
minimum: undefined,
|
|
28
28
|
maximum: undefined,
|
|
29
29
|
colorMap: undefined,
|
|
30
|
-
})
|
|
30
|
+
});
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
function setMeshPointsVertexAttributeStoredConfig(
|
|
34
|
-
id
|
|
35
|
-
name,
|
|
36
|
-
|
|
37
|
-
) {
|
|
38
|
-
const { storedConfigs } = meshPointsVertexAttribute(id)
|
|
39
|
-
storedConfigs[name] = { minimum, maximum, colorMap }
|
|
40
|
-
return storedConfigs[name]
|
|
33
|
+
function setMeshPointsVertexAttributeStoredConfig(id, name, { minimum, maximum, colorMap }) {
|
|
34
|
+
const { storedConfigs } = meshPointsVertexAttribute(id);
|
|
35
|
+
storedConfigs[name] = { minimum, maximum, colorMap };
|
|
36
|
+
return storedConfigs[name];
|
|
41
37
|
}
|
|
42
38
|
|
|
43
39
|
function meshPointsVertexAttributeName(id) {
|
|
44
|
-
console.log(
|
|
45
|
-
|
|
46
|
-
{ id },
|
|
47
|
-
meshPointsVertexAttribute(id),
|
|
48
|
-
)
|
|
49
|
-
return meshPointsVertexAttribute(id).name
|
|
40
|
+
console.log(meshPointsVertexAttributeName.name, { id }, meshPointsVertexAttribute(id));
|
|
41
|
+
return meshPointsVertexAttribute(id).name;
|
|
50
42
|
}
|
|
51
43
|
function setMeshPointsVertexAttributeName(id, name) {
|
|
52
|
-
console.log(setMeshPointsVertexAttributeName.name, { id, name })
|
|
44
|
+
console.log(setMeshPointsVertexAttributeName.name, { id, name });
|
|
53
45
|
return viewerStore.request(
|
|
54
46
|
meshPointsVertexAttributeSchemas.name,
|
|
55
47
|
{ id, name },
|
|
56
48
|
{
|
|
57
49
|
response_function: async () => {
|
|
58
|
-
meshPointsVertexAttribute(id).name = name
|
|
59
|
-
const { minimum, maximum } = meshPointsVertexAttributeStoredConfig(
|
|
60
|
-
|
|
61
|
-
name,
|
|
62
|
-
)
|
|
63
|
-
await setMeshPointsVertexAttributeRange(id, minimum, maximum)
|
|
50
|
+
meshPointsVertexAttribute(id).name = name;
|
|
51
|
+
const { minimum, maximum } = meshPointsVertexAttributeStoredConfig(id, name);
|
|
52
|
+
await setMeshPointsVertexAttributeRange(id, minimum, maximum);
|
|
64
53
|
console.log(
|
|
65
54
|
setMeshPointsVertexAttributeName.name,
|
|
66
55
|
{ id },
|
|
67
56
|
meshPointsVertexAttributeName(id),
|
|
68
|
-
)
|
|
57
|
+
);
|
|
69
58
|
},
|
|
70
59
|
},
|
|
71
|
-
)
|
|
60
|
+
);
|
|
72
61
|
}
|
|
73
62
|
|
|
74
63
|
function meshPointsVertexAttributeRange(id) {
|
|
75
|
-
const name = meshPointsVertexAttributeName(id)
|
|
76
|
-
const storedConfig = meshPointsVertexAttributeStoredConfig(id, name)
|
|
77
|
-
const { minimum, maximum } = storedConfig
|
|
78
|
-
return [minimum, maximum]
|
|
64
|
+
const name = meshPointsVertexAttributeName(id);
|
|
65
|
+
const storedConfig = meshPointsVertexAttributeStoredConfig(id, name);
|
|
66
|
+
const { minimum, maximum } = storedConfig;
|
|
67
|
+
return [minimum, maximum];
|
|
79
68
|
}
|
|
80
69
|
function setMeshPointsVertexAttributeRange(id, minimum, maximum) {
|
|
81
|
-
const name = meshPointsVertexAttributeName(id)
|
|
82
|
-
const storedConfig = meshPointsVertexAttributeStoredConfig(id, name)
|
|
83
|
-
storedConfig.minimum = minimum
|
|
84
|
-
storedConfig.maximum = maximum
|
|
85
|
-
return setMeshPointsVertexAttributeColorMap(id, storedConfig.colorMap)
|
|
70
|
+
const name = meshPointsVertexAttributeName(id);
|
|
71
|
+
const storedConfig = meshPointsVertexAttributeStoredConfig(id, name);
|
|
72
|
+
storedConfig.minimum = minimum;
|
|
73
|
+
storedConfig.maximum = maximum;
|
|
74
|
+
return setMeshPointsVertexAttributeColorMap(id, storedConfig.colorMap);
|
|
86
75
|
}
|
|
87
76
|
|
|
88
77
|
function meshPointsVertexAttributeColorMap(id) {
|
|
89
|
-
const name = meshPointsVertexAttributeName(id)
|
|
90
|
-
const storedConfig = meshPointsVertexAttributeStoredConfig(id, name)
|
|
91
|
-
const { colorMap } = storedConfig
|
|
92
|
-
return colorMap
|
|
78
|
+
const name = meshPointsVertexAttributeName(id);
|
|
79
|
+
const storedConfig = meshPointsVertexAttributeStoredConfig(id, name);
|
|
80
|
+
const { colorMap } = storedConfig;
|
|
81
|
+
return colorMap;
|
|
93
82
|
}
|
|
94
83
|
function setMeshPointsVertexAttributeColorMap(id, colorMap) {
|
|
95
|
-
const name = meshPointsVertexAttributeName(id)
|
|
96
|
-
const storedConfig = meshPointsVertexAttributeStoredConfig(id, name)
|
|
84
|
+
const name = meshPointsVertexAttributeName(id);
|
|
85
|
+
const storedConfig = meshPointsVertexAttributeStoredConfig(id, name);
|
|
97
86
|
if (
|
|
98
87
|
storedConfig.minimum === undefined ||
|
|
99
88
|
storedConfig.maximum === undefined ||
|
|
100
89
|
colorMap === undefined
|
|
101
90
|
) {
|
|
102
|
-
storedConfig.colorMap = colorMap
|
|
103
|
-
return
|
|
91
|
+
storedConfig.colorMap = colorMap;
|
|
92
|
+
return;
|
|
104
93
|
}
|
|
105
|
-
const points = getRGBPointsFromPreset(colorMap)
|
|
106
|
-
const { minimum, maximum } = storedConfig
|
|
94
|
+
const points = getRGBPointsFromPreset(colorMap);
|
|
95
|
+
const { minimum, maximum } = storedConfig;
|
|
107
96
|
|
|
108
97
|
console.log(setMeshPointsVertexAttributeColorMap.name, {
|
|
109
98
|
id,
|
|
110
99
|
minimum,
|
|
111
100
|
maximum,
|
|
112
101
|
colorMap,
|
|
113
|
-
})
|
|
102
|
+
});
|
|
114
103
|
return viewerStore.request(
|
|
115
104
|
meshPointsVertexAttributeSchemas.color_map,
|
|
116
105
|
{ id, points, minimum, maximum },
|
|
117
106
|
{
|
|
118
107
|
response_function: () => {
|
|
119
|
-
storedConfig.colorMap = colorMap
|
|
108
|
+
storedConfig.colorMap = colorMap;
|
|
120
109
|
console.log(
|
|
121
110
|
setMeshPointsVertexAttributeColorMap.name,
|
|
122
111
|
{ id },
|
|
123
112
|
meshPointsVertexAttributeColorMap(id),
|
|
124
|
-
)
|
|
113
|
+
);
|
|
125
114
|
},
|
|
126
115
|
},
|
|
127
|
-
)
|
|
116
|
+
);
|
|
128
117
|
}
|
|
129
118
|
|
|
130
119
|
return {
|
|
@@ -135,5 +124,5 @@ export function useMeshPointsVertexAttributeStyle() {
|
|
|
135
124
|
setMeshPointsVertexAttributeName,
|
|
136
125
|
setMeshPointsVertexAttributeRange,
|
|
137
126
|
setMeshPointsVertexAttributeColorMap,
|
|
138
|
-
}
|
|
127
|
+
};
|
|
139
128
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
// Third party imports
|
|
2
|
-
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
2
|
+
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json";
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
|
-
import { useMeshPointsCommonStyle } from "./common"
|
|
6
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
5
|
+
import { useMeshPointsCommonStyle } from "./common";
|
|
6
|
+
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
7
7
|
|
|
8
8
|
// Local constants
|
|
9
|
-
const meshPointsVisibilitySchema =
|
|
10
|
-
viewer_schemas.opengeodeweb_viewer.mesh.points.visibility
|
|
9
|
+
const meshPointsVisibilitySchema = viewer_schemas.opengeodeweb_viewer.mesh.points.visibility;
|
|
11
10
|
|
|
12
11
|
export function useMeshPointsVisibilityStyle() {
|
|
13
|
-
const viewerStore = useViewerStore()
|
|
14
|
-
const meshPointsCommonStyle = useMeshPointsCommonStyle()
|
|
12
|
+
const viewerStore = useViewerStore();
|
|
13
|
+
const meshPointsCommonStyle = useMeshPointsCommonStyle();
|
|
15
14
|
|
|
16
15
|
function meshPointsVisibility(id) {
|
|
17
|
-
return meshPointsCommonStyle.meshPointsStyle(id).visibility
|
|
16
|
+
return meshPointsCommonStyle.meshPointsStyle(id).visibility;
|
|
18
17
|
}
|
|
19
18
|
function setMeshPointsVisibility(id, visibility) {
|
|
20
19
|
return viewerStore.request(
|
|
@@ -22,19 +21,15 @@ export function useMeshPointsVisibilityStyle() {
|
|
|
22
21
|
{ id, visibility },
|
|
23
22
|
{
|
|
24
23
|
response_function: () => {
|
|
25
|
-
meshPointsCommonStyle.meshPointsStyle(id).visibility = visibility
|
|
26
|
-
console.log(
|
|
27
|
-
setMeshPointsVisibility.name,
|
|
28
|
-
{ id },
|
|
29
|
-
meshPointsVisibility(id),
|
|
30
|
-
)
|
|
24
|
+
meshPointsCommonStyle.meshPointsStyle(id).visibility = visibility;
|
|
25
|
+
console.log(setMeshPointsVisibility.name, { id }, meshPointsVisibility(id));
|
|
31
26
|
},
|
|
32
27
|
},
|
|
33
|
-
)
|
|
28
|
+
);
|
|
34
29
|
}
|
|
35
30
|
|
|
36
31
|
return {
|
|
37
32
|
meshPointsVisibility,
|
|
38
33
|
setMeshPointsVisibility,
|
|
39
|
-
}
|
|
34
|
+
};
|
|
40
35
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
// Third party imports
|
|
2
|
-
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
2
|
+
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json";
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
|
-
import { useMeshPolygonsCommonStyle } from "./common"
|
|
6
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
5
|
+
import { useMeshPolygonsCommonStyle } from "./common";
|
|
6
|
+
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
7
7
|
|
|
8
8
|
// Local constants
|
|
9
|
-
const meshPolygonsColorSchemas =
|
|
10
|
-
viewer_schemas.opengeodeweb_viewer.mesh.polygons.color
|
|
9
|
+
const meshPolygonsColorSchemas = viewer_schemas.opengeodeweb_viewer.mesh.polygons.color;
|
|
11
10
|
|
|
12
11
|
export function useMeshPolygonsColorStyle() {
|
|
13
|
-
const viewerStore = useViewerStore()
|
|
14
|
-
const meshPolygonsCommonStyle = useMeshPolygonsCommonStyle()
|
|
12
|
+
const viewerStore = useViewerStore();
|
|
13
|
+
const meshPolygonsCommonStyle = useMeshPolygonsCommonStyle();
|
|
15
14
|
|
|
16
15
|
function meshPolygonsColor(id) {
|
|
17
|
-
return meshPolygonsCommonStyle.meshPolygonsColoring(id).color
|
|
16
|
+
return meshPolygonsCommonStyle.meshPolygonsColoring(id).color;
|
|
18
17
|
}
|
|
19
18
|
function setMeshPolygonsColor(id, color) {
|
|
20
19
|
return viewerStore.request(
|
|
@@ -22,19 +21,15 @@ export function useMeshPolygonsColorStyle() {
|
|
|
22
21
|
{ id, color },
|
|
23
22
|
{
|
|
24
23
|
response_function: () => {
|
|
25
|
-
meshPolygonsCommonStyle.meshPolygonsColoring(id).color = color
|
|
26
|
-
console.log(
|
|
27
|
-
setMeshPolygonsColor.name,
|
|
28
|
-
{ id },
|
|
29
|
-
JSON.stringify(meshPolygonsColor(id)),
|
|
30
|
-
)
|
|
24
|
+
meshPolygonsCommonStyle.meshPolygonsColoring(id).color = color;
|
|
25
|
+
console.log(setMeshPolygonsColor.name, { id }, JSON.stringify(meshPolygonsColor(id)));
|
|
31
26
|
},
|
|
32
27
|
},
|
|
33
|
-
)
|
|
28
|
+
);
|
|
34
29
|
}
|
|
35
30
|
|
|
36
31
|
return {
|
|
37
32
|
meshPolygonsColor,
|
|
38
33
|
setMeshPolygonsColor,
|
|
39
|
-
}
|
|
34
|
+
};
|
|
40
35
|
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state"
|
|
1
|
+
import { useDataStyleStateStore } from "@ogw_internal/stores/data_style/state";
|
|
2
2
|
|
|
3
3
|
export function useMeshPolygonsCommonStyle() {
|
|
4
|
-
const dataStyleStateStore = useDataStyleStateStore()
|
|
4
|
+
const dataStyleStateStore = useDataStyleStateStore();
|
|
5
5
|
|
|
6
6
|
function meshPolygonsStyle(id) {
|
|
7
|
-
return dataStyleStateStore.getStyle(id).polygons
|
|
7
|
+
return dataStyleStateStore.getStyle(id).polygons;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
function meshPolygonsColoring(id) {
|
|
11
|
-
return meshPolygonsStyle(id).coloring
|
|
11
|
+
return meshPolygonsStyle(id).coloring;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
function meshPolygonsActiveColoring(id) {
|
|
15
|
-
return meshPolygonsColoring(id).active
|
|
15
|
+
return meshPolygonsColoring(id).active;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
return {
|
|
19
19
|
meshPolygonsStyle,
|
|
20
20
|
meshPolygonsColoring,
|
|
21
21
|
meshPolygonsActiveColoring,
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
23
|
}
|
|
@@ -1,66 +1,60 @@
|
|
|
1
1
|
// Third party imports
|
|
2
2
|
|
|
3
3
|
// Local imports
|
|
4
|
-
import { useMeshPolygonsColorStyle } from "./color"
|
|
5
|
-
import { useMeshPolygonsCommonStyle } from "./common"
|
|
6
|
-
import { useMeshPolygonsPolygonAttributeStyle } from "./polygon"
|
|
7
|
-
import { useMeshPolygonsTexturesStyle } from "./textures"
|
|
8
|
-
import { useMeshPolygonsVertexAttributeStyle } from "./vertex"
|
|
9
|
-
import { useMeshPolygonsVisibilityStyle } from "./visibility"
|
|
4
|
+
import { useMeshPolygonsColorStyle } from "./color";
|
|
5
|
+
import { useMeshPolygonsCommonStyle } from "./common";
|
|
6
|
+
import { useMeshPolygonsPolygonAttributeStyle } from "./polygon";
|
|
7
|
+
import { useMeshPolygonsTexturesStyle } from "./textures";
|
|
8
|
+
import { useMeshPolygonsVertexAttributeStyle } from "./vertex";
|
|
9
|
+
import { useMeshPolygonsVisibilityStyle } from "./visibility";
|
|
10
10
|
|
|
11
11
|
// Local constants
|
|
12
12
|
|
|
13
13
|
export function useMeshPolygonsStyle() {
|
|
14
|
-
const meshPolygonsCommonStyle = useMeshPolygonsCommonStyle()
|
|
15
|
-
const meshPolygonsVisibility = useMeshPolygonsVisibilityStyle()
|
|
16
|
-
const meshPolygonsColorStyle = useMeshPolygonsColorStyle()
|
|
17
|
-
const meshPolygonsTexturesStyle = useMeshPolygonsTexturesStyle()
|
|
18
|
-
const meshPolygonsVertexAttributeStyle = useMeshPolygonsVertexAttributeStyle()
|
|
19
|
-
const meshPolygonsPolygonAttributeStyle =
|
|
20
|
-
useMeshPolygonsPolygonAttributeStyle()
|
|
14
|
+
const meshPolygonsCommonStyle = useMeshPolygonsCommonStyle();
|
|
15
|
+
const meshPolygonsVisibility = useMeshPolygonsVisibilityStyle();
|
|
16
|
+
const meshPolygonsColorStyle = useMeshPolygonsColorStyle();
|
|
17
|
+
const meshPolygonsTexturesStyle = useMeshPolygonsTexturesStyle();
|
|
18
|
+
const meshPolygonsVertexAttributeStyle = useMeshPolygonsVertexAttributeStyle();
|
|
19
|
+
const meshPolygonsPolygonAttributeStyle = useMeshPolygonsPolygonAttributeStyle();
|
|
21
20
|
|
|
22
21
|
async function setMeshPolygonsActiveColoring(id, type) {
|
|
23
|
-
const coloring = meshPolygonsCommonStyle.meshPolygonsColoring(id)
|
|
24
|
-
coloring.active = type
|
|
22
|
+
const coloring = meshPolygonsCommonStyle.meshPolygonsColoring(id);
|
|
23
|
+
coloring.active = type;
|
|
25
24
|
console.log(
|
|
26
25
|
setMeshPolygonsActiveColoring.name,
|
|
27
26
|
{ id },
|
|
28
27
|
meshPolygonsCommonStyle.meshPolygonsActiveColoring(id),
|
|
29
|
-
)
|
|
28
|
+
);
|
|
30
29
|
if (type === "color") {
|
|
31
30
|
return meshPolygonsColorStyle.setMeshPolygonsColor(
|
|
32
31
|
id,
|
|
33
32
|
meshPolygonsColorStyle.meshPolygonsColor(id),
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
if (type === "textures") {
|
|
36
|
+
const textures = meshPolygonsTexturesStyle.meshPolygonsTextures(id);
|
|
37
37
|
if (textures === undefined) {
|
|
38
|
-
return
|
|
38
|
+
return;
|
|
39
39
|
}
|
|
40
|
-
return meshPolygonsTexturesStyle.setMeshPolygonsTextures(id, textures)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
return meshPolygonsTexturesStyle.setMeshPolygonsTextures(id, textures);
|
|
41
|
+
}
|
|
42
|
+
if (type === "vertex") {
|
|
43
|
+
const name = meshPolygonsVertexAttributeStyle.meshPolygonsVertexAttributeName(id);
|
|
44
44
|
if (name === undefined) {
|
|
45
|
-
return
|
|
45
|
+
return;
|
|
46
46
|
}
|
|
47
|
-
return meshPolygonsVertexAttributeStyle.setMeshPolygonsVertexAttributeName(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
)
|
|
51
|
-
} else if (type === "polygon") {
|
|
52
|
-
const name =
|
|
53
|
-
meshPolygonsPolygonAttributeStyle.meshPolygonsPolygonAttributeName(id)
|
|
47
|
+
return meshPolygonsVertexAttributeStyle.setMeshPolygonsVertexAttributeName(id, name);
|
|
48
|
+
}
|
|
49
|
+
if (type === "polygon") {
|
|
50
|
+
const name = meshPolygonsPolygonAttributeStyle.meshPolygonsPolygonAttributeName(id);
|
|
54
51
|
if (name === undefined) {
|
|
55
|
-
return
|
|
52
|
+
return;
|
|
56
53
|
}
|
|
57
|
-
await meshPolygonsPolygonAttributeStyle.setMeshPolygonsPolygonAttributeName(
|
|
58
|
-
|
|
59
|
-
name,
|
|
60
|
-
)
|
|
61
|
-
} else {
|
|
62
|
-
throw new Error(`Unknown mesh polygons coloring type: ${type}`)
|
|
54
|
+
await meshPolygonsPolygonAttributeStyle.setMeshPolygonsPolygonAttributeName(id, name);
|
|
55
|
+
return;
|
|
63
56
|
}
|
|
57
|
+
throw new Error(`Unknown mesh polygons coloring type: ${type}`);
|
|
64
58
|
}
|
|
65
59
|
|
|
66
60
|
function applyMeshPolygonsStyle(id) {
|
|
@@ -69,11 +63,8 @@ export function useMeshPolygonsStyle() {
|
|
|
69
63
|
id,
|
|
70
64
|
meshPolygonsVisibility.meshPolygonsVisibility(id),
|
|
71
65
|
),
|
|
72
|
-
setMeshPolygonsActiveColoring(
|
|
73
|
-
|
|
74
|
-
meshPolygonsCommonStyle.meshPolygonsActiveColoring(id),
|
|
75
|
-
),
|
|
76
|
-
])
|
|
66
|
+
setMeshPolygonsActiveColoring(id, meshPolygonsCommonStyle.meshPolygonsActiveColoring(id)),
|
|
67
|
+
]);
|
|
77
68
|
}
|
|
78
69
|
|
|
79
70
|
return {
|
|
@@ -85,5 +76,5 @@ export function useMeshPolygonsStyle() {
|
|
|
85
76
|
...meshPolygonsTexturesStyle,
|
|
86
77
|
...meshPolygonsVertexAttributeStyle,
|
|
87
78
|
...meshPolygonsPolygonAttributeStyle,
|
|
88
|
-
}
|
|
79
|
+
};
|
|
89
80
|
}
|
|
@@ -1,47 +1,43 @@
|
|
|
1
1
|
// Third party imports
|
|
2
|
-
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
2
|
+
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json";
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
|
-
import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap"
|
|
6
|
-
import { useMeshPolygonsCommonStyle } from "./common"
|
|
7
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
5
|
+
import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap";
|
|
6
|
+
import { useMeshPolygonsCommonStyle } from "./common";
|
|
7
|
+
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
8
8
|
|
|
9
9
|
// Local constants
|
|
10
10
|
const meshPolygonsPolygonAttributeSchemas =
|
|
11
|
-
viewer_schemas.opengeodeweb_viewer.mesh.polygons.attribute.polygon
|
|
11
|
+
viewer_schemas.opengeodeweb_viewer.mesh.polygons.attribute.polygon;
|
|
12
12
|
|
|
13
13
|
export function useMeshPolygonsPolygonAttributeStyle() {
|
|
14
|
-
const viewerStore = useViewerStore()
|
|
15
|
-
const meshPolygonsCommonStyle = useMeshPolygonsCommonStyle()
|
|
14
|
+
const viewerStore = useViewerStore();
|
|
15
|
+
const meshPolygonsCommonStyle = useMeshPolygonsCommonStyle();
|
|
16
16
|
|
|
17
17
|
function meshPolygonsPolygonAttribute(id) {
|
|
18
|
-
return meshPolygonsCommonStyle.meshPolygonsColoring(id).polygon
|
|
18
|
+
return meshPolygonsCommonStyle.meshPolygonsColoring(id).polygon;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function meshPolygonsPolygonAttributeStoredConfig(id, name) {
|
|
22
|
-
const { storedConfigs } = meshPolygonsPolygonAttribute(id)
|
|
22
|
+
const { storedConfigs } = meshPolygonsPolygonAttribute(id);
|
|
23
23
|
if (name in storedConfigs) {
|
|
24
|
-
return storedConfigs[name]
|
|
24
|
+
return storedConfigs[name];
|
|
25
25
|
}
|
|
26
26
|
return setMeshPolygonsPolygonAttributeStoredConfig(id, name, {
|
|
27
27
|
minimum: undefined,
|
|
28
28
|
maximum: undefined,
|
|
29
29
|
colorMap: undefined,
|
|
30
|
-
})
|
|
30
|
+
});
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
function setMeshPolygonsPolygonAttributeStoredConfig(
|
|
34
|
-
id
|
|
35
|
-
name,
|
|
36
|
-
|
|
37
|
-
) {
|
|
38
|
-
const { storedConfigs } = meshPolygonsPolygonAttribute(id)
|
|
39
|
-
storedConfigs[name] = { minimum, maximum, colorMap }
|
|
40
|
-
return storedConfigs[name]
|
|
33
|
+
function setMeshPolygonsPolygonAttributeStoredConfig(id, name, { minimum, maximum, colorMap }) {
|
|
34
|
+
const { storedConfigs } = meshPolygonsPolygonAttribute(id);
|
|
35
|
+
storedConfigs[name] = { minimum, maximum, colorMap };
|
|
36
|
+
return storedConfigs[name];
|
|
41
37
|
}
|
|
42
38
|
|
|
43
39
|
function meshPolygonsPolygonAttributeName(id) {
|
|
44
|
-
return meshPolygonsPolygonAttribute(id).name
|
|
40
|
+
return meshPolygonsPolygonAttribute(id).name;
|
|
45
41
|
}
|
|
46
42
|
function setMeshPolygonsPolygonAttributeName(id, name) {
|
|
47
43
|
return viewerStore.request(
|
|
@@ -49,73 +45,66 @@ export function useMeshPolygonsPolygonAttributeStyle() {
|
|
|
49
45
|
{ id, name },
|
|
50
46
|
{
|
|
51
47
|
response_function: async () => {
|
|
52
|
-
meshPolygonsPolygonAttribute(id).name = name
|
|
53
|
-
const { minimum, maximum } = meshPolygonsPolygonAttributeStoredConfig(
|
|
54
|
-
|
|
55
|
-
name,
|
|
56
|
-
)
|
|
57
|
-
await setMeshPolygonsPolygonAttributeRange(id, minimum, maximum)
|
|
48
|
+
meshPolygonsPolygonAttribute(id).name = name;
|
|
49
|
+
const { minimum, maximum } = meshPolygonsPolygonAttributeStoredConfig(id, name);
|
|
50
|
+
await setMeshPolygonsPolygonAttributeRange(id, minimum, maximum);
|
|
58
51
|
console.log(
|
|
59
52
|
setMeshPolygonsPolygonAttributeName.name,
|
|
60
53
|
{ id },
|
|
61
54
|
meshPolygonsPolygonAttributeName(id),
|
|
62
|
-
)
|
|
55
|
+
);
|
|
63
56
|
},
|
|
64
57
|
},
|
|
65
|
-
)
|
|
58
|
+
);
|
|
66
59
|
}
|
|
67
60
|
function meshPolygonsPolygonAttributeRange(id) {
|
|
68
|
-
const name = meshPolygonsPolygonAttributeName(id)
|
|
69
|
-
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(id, name)
|
|
70
|
-
const { minimum, maximum } = storedConfig
|
|
71
|
-
console.log(
|
|
72
|
-
|
|
73
|
-
{ id },
|
|
74
|
-
{ minimum, maximum },
|
|
75
|
-
)
|
|
76
|
-
return [minimum, maximum]
|
|
61
|
+
const name = meshPolygonsPolygonAttributeName(id);
|
|
62
|
+
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(id, name);
|
|
63
|
+
const { minimum, maximum } = storedConfig;
|
|
64
|
+
console.log(meshPolygonsPolygonAttributeRange.name, { id }, { minimum, maximum });
|
|
65
|
+
return [minimum, maximum];
|
|
77
66
|
}
|
|
78
67
|
function setMeshPolygonsPolygonAttributeRange(id, minimum, maximum) {
|
|
79
|
-
const name = meshPolygonsPolygonAttributeName(id)
|
|
80
|
-
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(id, name)
|
|
81
|
-
storedConfig.minimum = minimum
|
|
82
|
-
storedConfig.maximum = maximum
|
|
83
|
-
return setMeshPolygonsPolygonAttributeColorMap(id, storedConfig.colorMap)
|
|
68
|
+
const name = meshPolygonsPolygonAttributeName(id);
|
|
69
|
+
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(id, name);
|
|
70
|
+
storedConfig.minimum = minimum;
|
|
71
|
+
storedConfig.maximum = maximum;
|
|
72
|
+
return setMeshPolygonsPolygonAttributeColorMap(id, storedConfig.colorMap);
|
|
84
73
|
}
|
|
85
74
|
|
|
86
75
|
function meshPolygonsPolygonAttributeColorMap(id) {
|
|
87
|
-
const name = meshPolygonsPolygonAttributeName(id)
|
|
88
|
-
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(id, name)
|
|
89
|
-
const { colorMap } = storedConfig
|
|
90
|
-
return colorMap
|
|
76
|
+
const name = meshPolygonsPolygonAttributeName(id);
|
|
77
|
+
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(id, name);
|
|
78
|
+
const { colorMap } = storedConfig;
|
|
79
|
+
return colorMap;
|
|
91
80
|
}
|
|
92
81
|
function setMeshPolygonsPolygonAttributeColorMap(id, colorMap) {
|
|
93
|
-
const name = meshPolygonsPolygonAttributeName(id)
|
|
94
|
-
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(id, name)
|
|
82
|
+
const name = meshPolygonsPolygonAttributeName(id);
|
|
83
|
+
const storedConfig = meshPolygonsPolygonAttributeStoredConfig(id, name);
|
|
95
84
|
if (
|
|
96
85
|
storedConfig.minimum === undefined ||
|
|
97
86
|
storedConfig.maximum === undefined ||
|
|
98
87
|
colorMap === undefined
|
|
99
88
|
) {
|
|
100
|
-
storedConfig.colorMap = colorMap
|
|
101
|
-
return
|
|
89
|
+
storedConfig.colorMap = colorMap;
|
|
90
|
+
return;
|
|
102
91
|
}
|
|
103
|
-
const points = getRGBPointsFromPreset(colorMap)
|
|
104
|
-
const { minimum, maximum } = storedConfig
|
|
92
|
+
const points = getRGBPointsFromPreset(colorMap);
|
|
93
|
+
const { minimum, maximum } = storedConfig;
|
|
105
94
|
return viewerStore.request(
|
|
106
95
|
meshPolygonsPolygonAttributeSchemas.color_map,
|
|
107
96
|
{ id, points, minimum, maximum },
|
|
108
97
|
{
|
|
109
98
|
response_function: () => {
|
|
110
|
-
storedConfig.colorMap = colorMap
|
|
99
|
+
storedConfig.colorMap = colorMap;
|
|
111
100
|
console.log(
|
|
112
101
|
setMeshPolygonsPolygonAttributeColorMap.name,
|
|
113
102
|
{ id },
|
|
114
103
|
meshPolygonsPolygonAttributeColorMap(id),
|
|
115
|
-
)
|
|
104
|
+
);
|
|
116
105
|
},
|
|
117
106
|
},
|
|
118
|
-
)
|
|
107
|
+
);
|
|
119
108
|
}
|
|
120
109
|
|
|
121
110
|
return {
|
|
@@ -126,5 +115,5 @@ export function useMeshPolygonsPolygonAttributeStyle() {
|
|
|
126
115
|
setMeshPolygonsPolygonAttributeName,
|
|
127
116
|
setMeshPolygonsPolygonAttributeRange,
|
|
128
117
|
setMeshPolygonsPolygonAttributeColorMap,
|
|
129
|
-
}
|
|
118
|
+
};
|
|
130
119
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
// Third party imports
|
|
2
|
-
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
2
|
+
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json";
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
|
-
import { useMeshPolygonsCommonStyle } from "./common"
|
|
6
|
-
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
5
|
+
import { useMeshPolygonsCommonStyle } from "./common";
|
|
6
|
+
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
7
7
|
|
|
8
8
|
// Local constants
|
|
9
|
-
const meshPolygonsTexturesSchemas =
|
|
10
|
-
viewer_schemas.opengeodeweb_viewer.mesh.polygons.apply_textures
|
|
9
|
+
const meshPolygonsTexturesSchemas = viewer_schemas.opengeodeweb_viewer.mesh.polygons.apply_textures;
|
|
11
10
|
|
|
12
11
|
export function useMeshPolygonsTexturesStyle() {
|
|
13
|
-
const viewerStore = useViewerStore()
|
|
14
|
-
const meshPolygonsCommonStyle = useMeshPolygonsCommonStyle()
|
|
12
|
+
const viewerStore = useViewerStore();
|
|
13
|
+
const meshPolygonsCommonStyle = useMeshPolygonsCommonStyle();
|
|
15
14
|
|
|
16
15
|
function meshPolygonsTextures(id) {
|
|
17
|
-
return meshPolygonsCommonStyle.meshPolygonsColoring(id).textures
|
|
16
|
+
return meshPolygonsCommonStyle.meshPolygonsColoring(id).textures;
|
|
18
17
|
}
|
|
19
18
|
function setMeshPolygonsTextures(id, textures) {
|
|
20
19
|
return viewerStore.request(
|
|
@@ -22,19 +21,15 @@ export function useMeshPolygonsTexturesStyle() {
|
|
|
22
21
|
{ id, textures },
|
|
23
22
|
{
|
|
24
23
|
response_function: () => {
|
|
25
|
-
meshPolygonsCommonStyle.meshPolygonsColoring(id).textures = textures
|
|
26
|
-
console.log(
|
|
27
|
-
setMeshPolygonsTextures.name,
|
|
28
|
-
{ id },
|
|
29
|
-
meshPolygonsTextures(id),
|
|
30
|
-
)
|
|
24
|
+
meshPolygonsCommonStyle.meshPolygonsColoring(id).textures = textures;
|
|
25
|
+
console.log(setMeshPolygonsTextures.name, { id }, meshPolygonsTextures(id));
|
|
31
26
|
},
|
|
32
27
|
},
|
|
33
|
-
)
|
|
28
|
+
);
|
|
34
29
|
}
|
|
35
30
|
|
|
36
31
|
return {
|
|
37
32
|
meshPolygonsTextures,
|
|
38
33
|
setMeshPolygonsTextures,
|
|
39
|
-
}
|
|
34
|
+
};
|
|
40
35
|
}
|