@geode/opengeodeweb-front 10.21.1-rc.2 → 10.22.0-rc.2
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/app/components/ObjectSelector.vue +14 -0
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +32 -10
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +32 -10
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +14 -4
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +23 -7
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +14 -4
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +26 -8
- package/app/components/Viewer/Generic/Model/EdgesOptions.vue +5 -1
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +32 -12
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +8 -2
- package/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue +53 -5
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +1 -0
- package/app/components/Viewer/ObjectTree/Views/ModelCollections.vue +1 -0
- package/app/components/Viewer/ObjectTree/Views/ModelComponents.vue +1 -0
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +23 -7
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +26 -8
- package/app/components/Viewer/Surface/PolygonsOptions.vue +32 -10
- package/app/composables/batch_style.js +38 -0
- package/app/composables/virtual_tree.js +4 -0
- package/app/stores/treeview.js +3 -0
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ const backStore = useBackStore();
|
|
|
17
17
|
const loading = ref(false);
|
|
18
18
|
const allowed_objects = ref({});
|
|
19
19
|
const toggle_loading = useToggle(loading);
|
|
20
|
+
const multiple_files_no_common = ref(false);
|
|
20
21
|
|
|
21
22
|
function select_geode_object(object_map) {
|
|
22
23
|
const object_keys = Object.keys(object_map);
|
|
@@ -51,12 +52,18 @@ function select_geode_object(object_map) {
|
|
|
51
52
|
async function get_allowed_objects() {
|
|
52
53
|
toggle_loading();
|
|
53
54
|
allowed_objects.value = {};
|
|
55
|
+
multiple_files_no_common.value = false;
|
|
54
56
|
|
|
55
57
|
const promise_array = filenames.map((filename) => backStore.request(schema, { filename }));
|
|
56
58
|
const responses = await Promise.all(promise_array);
|
|
57
59
|
const allowed_objects_list = responses.map((response) => response.allowed_objects);
|
|
58
60
|
const all_keys = [...new Set(allowed_objects_list.flatMap((obj) => Object.keys(obj)))];
|
|
59
61
|
const common_keys = all_keys.filter((key) => allowed_objects_list.every((obj) => key in obj));
|
|
62
|
+
|
|
63
|
+
if (filenames.length > 1 && all_keys.length > 0 && common_keys.length === 0) {
|
|
64
|
+
multiple_files_no_common.value = true;
|
|
65
|
+
}
|
|
66
|
+
|
|
60
67
|
const final_object = {};
|
|
61
68
|
for (const key of common_keys) {
|
|
62
69
|
const load_scores = allowed_objects_list.map((obj) => obj[key].is_loadable);
|
|
@@ -127,6 +134,13 @@ await get_allowed_objects();
|
|
|
127
134
|
</v-tooltip>
|
|
128
135
|
</v-col>
|
|
129
136
|
</v-row>
|
|
137
|
+
<v-row v-else-if="multiple_files_no_common" class="pa-5">
|
|
138
|
+
<v-card class="card" variant="tonal" rounded>
|
|
139
|
+
<v-card-text>
|
|
140
|
+
These files cannot be loaded together because they don't share a common data type.
|
|
141
|
+
</v-card-text>
|
|
142
|
+
</v-card>
|
|
143
|
+
</v-row>
|
|
130
144
|
<v-row v-else class="pa-5">
|
|
131
145
|
<v-card class="card" variant="tonal" rounded>
|
|
132
146
|
<v-card-text>
|
|
@@ -5,11 +5,13 @@ import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Opti
|
|
|
5
5
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
6
6
|
import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width";
|
|
7
7
|
|
|
8
|
+
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
8
9
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
9
10
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
10
11
|
|
|
11
12
|
const dataStyleStore = useDataStyleStore();
|
|
12
13
|
const hybridViewerStore = useHybridViewerStore();
|
|
14
|
+
const { applyBatchStyle } = useBatchStyle();
|
|
13
15
|
|
|
14
16
|
const { itemProps } = defineProps({
|
|
15
17
|
itemProps: { type: Object, required: true },
|
|
@@ -20,70 +22,90 @@ const id = toRef(() => itemProps.id);
|
|
|
20
22
|
const visibility = computed({
|
|
21
23
|
get: () => dataStyleStore.meshEdgesVisibility(id.value),
|
|
22
24
|
set: async (newValue) => {
|
|
23
|
-
await
|
|
25
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
26
|
+
dataStyleStore.setMeshEdgesVisibility(targetId, newValue),
|
|
27
|
+
);
|
|
24
28
|
hybridViewerStore.remoteRender();
|
|
25
29
|
},
|
|
26
30
|
});
|
|
27
31
|
const width = computed({
|
|
28
32
|
get: () => dataStyleStore.meshEdgesWidth(id.value),
|
|
29
33
|
set: async (newValue) => {
|
|
30
|
-
await
|
|
34
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
35
|
+
dataStyleStore.setMeshEdgesWidth(targetId, newValue),
|
|
36
|
+
);
|
|
31
37
|
hybridViewerStore.remoteRender();
|
|
32
38
|
},
|
|
33
39
|
});
|
|
34
40
|
const coloring_style_key = computed({
|
|
35
41
|
get: () => dataStyleStore.meshEdgesActiveColoring(id.value),
|
|
36
42
|
set: async (newValue) => {
|
|
37
|
-
await
|
|
43
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
44
|
+
dataStyleStore.setMeshEdgesActiveColoring(targetId, newValue),
|
|
45
|
+
);
|
|
38
46
|
hybridViewerStore.remoteRender();
|
|
39
47
|
},
|
|
40
48
|
});
|
|
41
49
|
const color = computed({
|
|
42
50
|
get: () => dataStyleStore.meshEdgesColor(id.value),
|
|
43
51
|
set: async (newValue) => {
|
|
44
|
-
await
|
|
52
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
53
|
+
dataStyleStore.setMeshEdgesColor(targetId, newValue),
|
|
54
|
+
);
|
|
45
55
|
hybridViewerStore.remoteRender();
|
|
46
56
|
},
|
|
47
57
|
});
|
|
48
58
|
const vertex_attribute_name = computed({
|
|
49
59
|
get: () => dataStyleStore.meshEdgesVertexAttributeName(id.value),
|
|
50
60
|
set: async (newValue) => {
|
|
51
|
-
await
|
|
61
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
62
|
+
dataStyleStore.setMeshEdgesVertexAttributeName(targetId, newValue),
|
|
63
|
+
);
|
|
52
64
|
hybridViewerStore.remoteRender();
|
|
53
65
|
},
|
|
54
66
|
});
|
|
55
67
|
const vertex_attribute_range = computed({
|
|
56
68
|
get: () => dataStyleStore.meshEdgesVertexAttributeRange(id.value),
|
|
57
69
|
set: async (newValue) => {
|
|
58
|
-
await
|
|
70
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
71
|
+
dataStyleStore.setMeshEdgesVertexAttributeRange(targetId, newValue[0], newValue[1]),
|
|
72
|
+
);
|
|
59
73
|
hybridViewerStore.remoteRender();
|
|
60
74
|
},
|
|
61
75
|
});
|
|
62
76
|
const vertex_attribute_color_map = computed({
|
|
63
77
|
get: () => dataStyleStore.meshEdgesVertexAttributeColorMap(id.value),
|
|
64
78
|
set: async (newValue) => {
|
|
65
|
-
await
|
|
79
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
80
|
+
dataStyleStore.setMeshEdgesVertexAttributeColorMap(targetId, newValue),
|
|
81
|
+
);
|
|
66
82
|
hybridViewerStore.remoteRender();
|
|
67
83
|
},
|
|
68
84
|
});
|
|
69
85
|
const edge_attribute_name = computed({
|
|
70
86
|
get: () => dataStyleStore.meshEdgesEdgeAttributeName(id.value),
|
|
71
87
|
set: async (newValue) => {
|
|
72
|
-
await
|
|
88
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
89
|
+
dataStyleStore.setMeshEdgesEdgeAttributeName(targetId, newValue),
|
|
90
|
+
);
|
|
73
91
|
hybridViewerStore.remoteRender();
|
|
74
92
|
},
|
|
75
93
|
});
|
|
76
94
|
const edge_attribute_range = computed({
|
|
77
95
|
get: () => dataStyleStore.meshEdgesEdgeAttributeRange(id.value),
|
|
78
96
|
set: async (newValue) => {
|
|
79
|
-
await
|
|
97
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
98
|
+
dataStyleStore.setMeshEdgesEdgeAttributeRange(targetId, newValue[0], newValue[1]),
|
|
99
|
+
);
|
|
80
100
|
hybridViewerStore.remoteRender();
|
|
81
101
|
},
|
|
82
102
|
});
|
|
83
103
|
const edge_attribute_color_map = computed({
|
|
84
104
|
get: () => dataStyleStore.meshEdgesEdgeAttributeColorMap(id.value),
|
|
85
105
|
set: async (newValue) => {
|
|
86
|
-
await
|
|
106
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
107
|
+
dataStyleStore.setMeshEdgesEdgeAttributeColorMap(targetId, newValue),
|
|
108
|
+
);
|
|
87
109
|
hybridViewerStore.remoteRender();
|
|
88
110
|
},
|
|
89
111
|
});
|
|
@@ -3,11 +3,13 @@ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/Cont
|
|
|
3
3
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector";
|
|
4
4
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
5
5
|
|
|
6
|
+
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
6
7
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
7
8
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
8
9
|
|
|
9
10
|
const dataStyleStore = useDataStyleStore();
|
|
10
11
|
const hybridViewerStore = useHybridViewerStore();
|
|
12
|
+
const { applyBatchStyle } = useBatchStyle();
|
|
11
13
|
|
|
12
14
|
const { itemProps, btn_image, tooltip } = defineProps({
|
|
13
15
|
itemProps: { type: Object, required: true },
|
|
@@ -20,70 +22,90 @@ const id = toRef(() => itemProps.id);
|
|
|
20
22
|
const visibility = computed({
|
|
21
23
|
get: () => dataStyleStore.meshCellsVisibility(id.value),
|
|
22
24
|
set: async (newValue) => {
|
|
23
|
-
await
|
|
25
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
26
|
+
dataStyleStore.setMeshCellsVisibility(targetId, newValue),
|
|
27
|
+
);
|
|
24
28
|
hybridViewerStore.remoteRender();
|
|
25
29
|
},
|
|
26
30
|
});
|
|
27
31
|
const coloring_style_key = computed({
|
|
28
32
|
get: () => dataStyleStore.meshCellsActiveColoring(id.value),
|
|
29
33
|
set: async (newValue) => {
|
|
30
|
-
await
|
|
34
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
35
|
+
dataStyleStore.setMeshCellsActiveColoring(targetId, newValue),
|
|
36
|
+
);
|
|
31
37
|
hybridViewerStore.remoteRender();
|
|
32
38
|
},
|
|
33
39
|
});
|
|
34
40
|
const color = computed({
|
|
35
41
|
get: () => dataStyleStore.meshCellsColor(id.value),
|
|
36
42
|
set: async (newValue) => {
|
|
37
|
-
await
|
|
43
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
44
|
+
dataStyleStore.setMeshCellsColor(targetId, newValue),
|
|
45
|
+
);
|
|
38
46
|
hybridViewerStore.remoteRender();
|
|
39
47
|
},
|
|
40
48
|
});
|
|
41
49
|
const textures = computed({
|
|
42
50
|
get: () => dataStyleStore.meshCellsTextures(id.value),
|
|
43
51
|
set: async (newValue) => {
|
|
44
|
-
await
|
|
52
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
53
|
+
dataStyleStore.setMeshCellsTextures(targetId, newValue),
|
|
54
|
+
);
|
|
45
55
|
hybridViewerStore.remoteRender();
|
|
46
56
|
},
|
|
47
57
|
});
|
|
48
58
|
const vertex_attribute_name = computed({
|
|
49
59
|
get: () => dataStyleStore.meshCellsVertexAttributeName(id.value),
|
|
50
60
|
set: async (newValue) => {
|
|
51
|
-
await
|
|
61
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
62
|
+
dataStyleStore.setMeshCellsVertexAttributeName(targetId, newValue),
|
|
63
|
+
);
|
|
52
64
|
hybridViewerStore.remoteRender();
|
|
53
65
|
},
|
|
54
66
|
});
|
|
55
67
|
const vertex_attribute_range = computed({
|
|
56
68
|
get: () => dataStyleStore.meshCellsVertexAttributeRange(id.value),
|
|
57
69
|
set: async (newValue) => {
|
|
58
|
-
await
|
|
70
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
71
|
+
dataStyleStore.setMeshCellsVertexAttributeRange(targetId, newValue[0], newValue[1]),
|
|
72
|
+
);
|
|
59
73
|
hybridViewerStore.remoteRender();
|
|
60
74
|
},
|
|
61
75
|
});
|
|
62
76
|
const vertex_attribute_color_map = computed({
|
|
63
77
|
get: () => dataStyleStore.meshCellsVertexAttributeColorMap(id.value),
|
|
64
78
|
set: async (newValue) => {
|
|
65
|
-
await
|
|
79
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
80
|
+
dataStyleStore.setMeshCellsVertexAttributeColorMap(targetId, newValue),
|
|
81
|
+
);
|
|
66
82
|
hybridViewerStore.remoteRender();
|
|
67
83
|
},
|
|
68
84
|
});
|
|
69
85
|
const cell_attribute_name = computed({
|
|
70
86
|
get: () => dataStyleStore.meshCellsCellAttributeName(id.value),
|
|
71
87
|
set: async (newValue) => {
|
|
72
|
-
await
|
|
88
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
89
|
+
dataStyleStore.setMeshCellsCellAttributeName(targetId, newValue),
|
|
90
|
+
);
|
|
73
91
|
hybridViewerStore.remoteRender();
|
|
74
92
|
},
|
|
75
93
|
});
|
|
76
94
|
const cell_attribute_range = computed({
|
|
77
95
|
get: () => dataStyleStore.meshCellsCellAttributeRange(id.value),
|
|
78
96
|
set: async (newValue) => {
|
|
79
|
-
await
|
|
97
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
98
|
+
dataStyleStore.setMeshCellsCellAttributeRange(targetId, newValue[0], newValue[1]),
|
|
99
|
+
);
|
|
80
100
|
hybridViewerStore.remoteRender();
|
|
81
101
|
},
|
|
82
102
|
});
|
|
83
103
|
const cell_attribute_color_map = computed({
|
|
84
104
|
get: () => dataStyleStore.meshCellsCellAttributeColorMap(id.value),
|
|
85
105
|
set: async (newValue) => {
|
|
86
|
-
await
|
|
106
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
107
|
+
dataStyleStore.setMeshCellsCellAttributeColorMap(targetId, newValue),
|
|
108
|
+
);
|
|
87
109
|
hybridViewerStore.remoteRender();
|
|
88
110
|
},
|
|
89
111
|
});
|
|
@@ -4,11 +4,13 @@ import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Opti
|
|
|
4
4
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
5
5
|
import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width";
|
|
6
6
|
|
|
7
|
+
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
7
8
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
8
9
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
9
10
|
|
|
10
11
|
const dataStyleStore = useDataStyleStore();
|
|
11
12
|
const hybridViewerStore = useHybridViewerStore();
|
|
13
|
+
const { applyBatchStyle } = useBatchStyle();
|
|
12
14
|
|
|
13
15
|
const { itemProps, btn_image, tooltip } = defineProps({
|
|
14
16
|
itemProps: { type: Object, required: true },
|
|
@@ -21,28 +23,36 @@ const id = toRef(() => itemProps.id);
|
|
|
21
23
|
const visibility = computed({
|
|
22
24
|
get: () => dataStyleStore.meshEdgesVisibility(id.value),
|
|
23
25
|
set: async (newValue) => {
|
|
24
|
-
await
|
|
26
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
27
|
+
dataStyleStore.setMeshEdgesVisibility(targetId, newValue),
|
|
28
|
+
);
|
|
25
29
|
hybridViewerStore.remoteRender();
|
|
26
30
|
},
|
|
27
31
|
});
|
|
28
32
|
const size = computed({
|
|
29
33
|
get: () => dataStyleStore.meshEdgesWidth(id.value),
|
|
30
34
|
set: async (newValue) => {
|
|
31
|
-
await
|
|
35
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
36
|
+
dataStyleStore.setMeshEdgesWidth(targetId, newValue),
|
|
37
|
+
);
|
|
32
38
|
hybridViewerStore.remoteRender();
|
|
33
39
|
},
|
|
34
40
|
});
|
|
35
41
|
const coloring_style_key = computed({
|
|
36
42
|
get: () => dataStyleStore.meshEdgesActiveColoring(id.value),
|
|
37
43
|
set: async (newValue) => {
|
|
38
|
-
await
|
|
44
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
45
|
+
dataStyleStore.setMeshEdgesActiveColoring(targetId, newValue),
|
|
46
|
+
);
|
|
39
47
|
hybridViewerStore.remoteRender();
|
|
40
48
|
},
|
|
41
49
|
});
|
|
42
50
|
const color = computed({
|
|
43
51
|
get: () => dataStyleStore.meshEdgesColor(id.value),
|
|
44
52
|
set: async (newValue) => {
|
|
45
|
-
await
|
|
53
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
54
|
+
dataStyleStore.setMeshEdgesColor(targetId, newValue),
|
|
55
|
+
);
|
|
46
56
|
hybridViewerStore.remoteRender();
|
|
47
57
|
},
|
|
48
58
|
});
|
|
@@ -4,11 +4,13 @@ import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Opti
|
|
|
4
4
|
import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size";
|
|
5
5
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
6
6
|
|
|
7
|
+
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
7
8
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
8
9
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
9
10
|
|
|
10
11
|
const dataStyleStore = useDataStyleStore();
|
|
11
12
|
const hybridViewerStore = useHybridViewerStore();
|
|
13
|
+
const { applyBatchStyle } = useBatchStyle();
|
|
12
14
|
|
|
13
15
|
const { itemProps, btn_image, tooltip } = defineProps({
|
|
14
16
|
itemProps: { type: Object, required: true },
|
|
@@ -21,49 +23,63 @@ const id = toRef(() => itemProps.id);
|
|
|
21
23
|
const visibility = computed({
|
|
22
24
|
get: () => dataStyleStore.meshPointsVisibility(id.value),
|
|
23
25
|
set: async (newValue) => {
|
|
24
|
-
await
|
|
26
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
27
|
+
dataStyleStore.setMeshPointsVisibility(targetId, newValue),
|
|
28
|
+
);
|
|
25
29
|
hybridViewerStore.remoteRender();
|
|
26
30
|
},
|
|
27
31
|
});
|
|
28
32
|
const size = computed({
|
|
29
33
|
get: () => dataStyleStore.meshPointsSize(id.value),
|
|
30
34
|
set: async (newValue) => {
|
|
31
|
-
await
|
|
35
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
36
|
+
dataStyleStore.setMeshPointsSize(targetId, newValue),
|
|
37
|
+
);
|
|
32
38
|
hybridViewerStore.remoteRender();
|
|
33
39
|
},
|
|
34
40
|
});
|
|
35
41
|
const coloring_style_key = computed({
|
|
36
42
|
get: () => dataStyleStore.meshPointsActiveColoring(id.value),
|
|
37
43
|
set: async (newValue) => {
|
|
38
|
-
await
|
|
44
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
45
|
+
dataStyleStore.setMeshPointsActiveColoring(targetId, newValue),
|
|
46
|
+
);
|
|
39
47
|
hybridViewerStore.remoteRender();
|
|
40
48
|
},
|
|
41
49
|
});
|
|
42
50
|
const color = computed({
|
|
43
51
|
get: () => dataStyleStore.meshPointsColor(id.value),
|
|
44
52
|
set: async (newValue) => {
|
|
45
|
-
await
|
|
53
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
54
|
+
dataStyleStore.setMeshPointsColor(targetId, newValue),
|
|
55
|
+
);
|
|
46
56
|
hybridViewerStore.remoteRender();
|
|
47
57
|
},
|
|
48
58
|
});
|
|
49
59
|
const vertex_attribute_name = computed({
|
|
50
60
|
get: () => dataStyleStore.meshPointsVertexAttributeName(id.value),
|
|
51
61
|
set: async (newValue) => {
|
|
52
|
-
await
|
|
62
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
63
|
+
dataStyleStore.setMeshPointsVertexAttributeName(targetId, newValue),
|
|
64
|
+
);
|
|
53
65
|
hybridViewerStore.remoteRender();
|
|
54
66
|
},
|
|
55
67
|
});
|
|
56
68
|
const vertex_attribute_range = computed({
|
|
57
69
|
get: () => dataStyleStore.meshPointsVertexAttributeRange(id.value),
|
|
58
70
|
set: async (newValue) => {
|
|
59
|
-
await
|
|
71
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
72
|
+
dataStyleStore.setMeshPointsVertexAttributeRange(targetId, newValue[0], newValue[1]),
|
|
73
|
+
);
|
|
60
74
|
hybridViewerStore.remoteRender();
|
|
61
75
|
},
|
|
62
76
|
});
|
|
63
77
|
const vertex_attribute_color_map = computed({
|
|
64
78
|
get: () => dataStyleStore.meshPointsVertexAttributeColorMap(id.value),
|
|
65
79
|
set: async (newValue) => {
|
|
66
|
-
await
|
|
80
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
81
|
+
dataStyleStore.setMeshPointsVertexAttributeColorMap(targetId, newValue),
|
|
82
|
+
);
|
|
67
83
|
hybridViewerStore.remoteRender();
|
|
68
84
|
},
|
|
69
85
|
});
|
|
@@ -3,11 +3,13 @@ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/Cont
|
|
|
3
3
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector";
|
|
4
4
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
5
5
|
|
|
6
|
+
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
6
7
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
7
8
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
8
9
|
|
|
9
10
|
const dataStyleStore = useDataStyleStore();
|
|
10
11
|
const hybridViewerStore = useHybridViewerStore();
|
|
12
|
+
const { applyBatchStyle } = useBatchStyle();
|
|
11
13
|
|
|
12
14
|
const { itemProps, btn_image, tooltip } = defineProps({
|
|
13
15
|
itemProps: { type: Object, required: true },
|
|
@@ -20,28 +22,36 @@ const id = toRef(() => itemProps.id);
|
|
|
20
22
|
const visibility = computed({
|
|
21
23
|
get: () => dataStyleStore.meshPolygonsVisibility(id.value),
|
|
22
24
|
set: async (newValue) => {
|
|
23
|
-
await
|
|
25
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
26
|
+
dataStyleStore.setMeshPolygonsVisibility(targetId, newValue),
|
|
27
|
+
);
|
|
24
28
|
hybridViewerStore.remoteRender();
|
|
25
29
|
},
|
|
26
30
|
});
|
|
27
31
|
const coloring_style_key = computed({
|
|
28
32
|
get: () => dataStyleStore.meshPolygonsActiveColoring(id.value),
|
|
29
33
|
set: async (newValue) => {
|
|
30
|
-
await
|
|
34
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
35
|
+
dataStyleStore.setMeshPolygonsActiveColoring(targetId, newValue),
|
|
36
|
+
);
|
|
31
37
|
hybridViewerStore.remoteRender();
|
|
32
38
|
},
|
|
33
39
|
});
|
|
34
40
|
const color = computed({
|
|
35
41
|
get: () => dataStyleStore.meshPolygonsColor(id.value),
|
|
36
42
|
set: async (newValue) => {
|
|
37
|
-
await
|
|
43
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
44
|
+
dataStyleStore.setMeshPolygonsColor(targetId, newValue),
|
|
45
|
+
);
|
|
38
46
|
hybridViewerStore.remoteRender();
|
|
39
47
|
},
|
|
40
48
|
});
|
|
41
49
|
const textures = computed({
|
|
42
50
|
get: () => dataStyleStore.meshPolygonsTextures(id.value),
|
|
43
51
|
set: async (newValue) => {
|
|
44
|
-
await
|
|
52
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
53
|
+
dataStyleStore.setMeshPolygonsTextures(targetId, newValue),
|
|
54
|
+
);
|
|
45
55
|
hybridViewerStore.remoteRender();
|
|
46
56
|
},
|
|
47
57
|
});
|
|
@@ -3,11 +3,13 @@ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/Cont
|
|
|
3
3
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector";
|
|
4
4
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
5
5
|
|
|
6
|
+
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
6
7
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
7
8
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
8
9
|
|
|
9
10
|
const dataStyleStore = useDataStyleStore();
|
|
10
11
|
const hybridViewerStore = useHybridViewerStore();
|
|
12
|
+
const { applyBatchStyle } = useBatchStyle();
|
|
11
13
|
|
|
12
14
|
const { itemProps, btn_image, tooltip } = defineProps({
|
|
13
15
|
itemProps: { type: Object, required: true },
|
|
@@ -20,49 +22,63 @@ const id = toRef(() => itemProps.id);
|
|
|
20
22
|
const visibility = computed({
|
|
21
23
|
get: () => dataStyleStore.meshPolyhedraVisibility(id.value),
|
|
22
24
|
set: async (newValue) => {
|
|
23
|
-
await
|
|
25
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
26
|
+
dataStyleStore.setMeshPolyhedraVisibility(targetId, newValue),
|
|
27
|
+
);
|
|
24
28
|
hybridViewerStore.remoteRender();
|
|
25
29
|
},
|
|
26
30
|
});
|
|
27
31
|
const coloring_style_key = computed({
|
|
28
32
|
get: () => dataStyleStore.meshPolyhedraActiveColoring(id.value),
|
|
29
33
|
set: async (newValue) => {
|
|
30
|
-
await
|
|
34
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
35
|
+
dataStyleStore.setMeshPolyhedraActiveColoring(targetId, newValue),
|
|
36
|
+
);
|
|
31
37
|
hybridViewerStore.remoteRender();
|
|
32
38
|
},
|
|
33
39
|
});
|
|
34
40
|
const color = computed({
|
|
35
41
|
get: () => dataStyleStore.meshPolyhedraColor(id.value),
|
|
36
42
|
set: async (newValue) => {
|
|
37
|
-
await
|
|
43
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
44
|
+
dataStyleStore.setMeshPolyhedraColor(targetId, newValue),
|
|
45
|
+
);
|
|
38
46
|
hybridViewerStore.remoteRender();
|
|
39
47
|
},
|
|
40
48
|
});
|
|
41
49
|
const vertex_attribute_name = computed({
|
|
42
50
|
get: () => dataStyleStore.meshPolyhedraVertexAttributeName(id.value),
|
|
43
51
|
set: async (newValue) => {
|
|
44
|
-
await
|
|
52
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
53
|
+
dataStyleStore.setMeshPolyhedraVertexAttributeName(targetId, newValue),
|
|
54
|
+
);
|
|
45
55
|
hybridViewerStore.remoteRender();
|
|
46
56
|
},
|
|
47
57
|
});
|
|
48
58
|
const vertex_attribute_range = computed({
|
|
49
59
|
get: () => dataStyleStore.meshPolyhedraVertexAttributeRange(id.value),
|
|
50
60
|
set: async (newValue) => {
|
|
51
|
-
await
|
|
61
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
62
|
+
dataStyleStore.setMeshPolyhedraVertexAttributeRange(targetId, newValue[0], newValue[1]),
|
|
63
|
+
);
|
|
52
64
|
hybridViewerStore.remoteRender();
|
|
53
65
|
},
|
|
54
66
|
});
|
|
55
67
|
const vertex_attribute_color_map = computed({
|
|
56
68
|
get: () => dataStyleStore.meshPolyhedraVertexAttributeColorMap(id.value),
|
|
57
69
|
set: async (newValue) => {
|
|
58
|
-
await
|
|
70
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
71
|
+
dataStyleStore.setMeshPolyhedraVertexAttributeColorMap(targetId, newValue),
|
|
72
|
+
);
|
|
59
73
|
hybridViewerStore.remoteRender();
|
|
60
74
|
},
|
|
61
75
|
});
|
|
62
76
|
const polyhedron_attribute_name = computed({
|
|
63
77
|
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeName(id.value),
|
|
64
78
|
set: async (newValue) => {
|
|
65
|
-
await
|
|
79
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
80
|
+
dataStyleStore.setMeshPolyhedraPolyhedronAttributeName(targetId, newValue),
|
|
81
|
+
);
|
|
66
82
|
hybridViewerStore.remoteRender();
|
|
67
83
|
},
|
|
68
84
|
});
|
|
@@ -80,7 +96,9 @@ const polyhedron_attribute_range = computed({
|
|
|
80
96
|
const polyhedron_attribute_color_map = computed({
|
|
81
97
|
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeColorMap(id.value),
|
|
82
98
|
set: async (newValue) => {
|
|
83
|
-
await
|
|
99
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
100
|
+
dataStyleStore.setMeshPolyhedraPolyhedronAttributeColorMap(targetId, newValue),
|
|
101
|
+
);
|
|
84
102
|
hybridViewerStore.remoteRender();
|
|
85
103
|
},
|
|
86
104
|
});
|
|
@@ -3,11 +3,13 @@ import SurfaceEdges from "@ogw_front/assets/viewer_svgs/surface_edges.svg";
|
|
|
3
3
|
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem";
|
|
4
4
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
5
5
|
|
|
6
|
+
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
6
7
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
7
8
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
8
9
|
|
|
9
10
|
const dataStyleStore = useDataStyleStore();
|
|
10
11
|
const hybridViewerStore = useHybridViewerStore();
|
|
12
|
+
const { applyBatchStyle } = useBatchStyle();
|
|
11
13
|
|
|
12
14
|
const { itemProps } = defineProps({
|
|
13
15
|
itemProps: { type: Object, required: true },
|
|
@@ -18,7 +20,9 @@ const id = toRef(() => itemProps.id);
|
|
|
18
20
|
const visibility = computed({
|
|
19
21
|
get: () => dataStyleStore.modelEdgesVisibility(id.value),
|
|
20
22
|
set: async (newValue) => {
|
|
21
|
-
await
|
|
23
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
24
|
+
dataStyleStore.setModelEdgesVisibility(targetId, newValue),
|
|
25
|
+
);
|
|
22
26
|
hybridViewerStore.remoteRender();
|
|
23
27
|
},
|
|
24
28
|
});
|
|
@@ -5,10 +5,20 @@ import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwi
|
|
|
5
5
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
6
6
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
7
7
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
8
|
+
import { useTreeviewStore } from "@ogw_front/stores/treeview";
|
|
8
9
|
|
|
9
10
|
const dataStyleStore = useDataStyleStore();
|
|
10
11
|
const hybridViewerStore = useHybridViewerStore();
|
|
11
12
|
const dataStore = useDataStore();
|
|
13
|
+
const treeviewStore = useTreeviewStore();
|
|
14
|
+
|
|
15
|
+
function getBatchComponentIds(currentId) {
|
|
16
|
+
const { activeItems } = treeviewStore;
|
|
17
|
+
if (activeItems.includes(currentId) && activeItems.length > 1) {
|
|
18
|
+
return activeItems;
|
|
19
|
+
}
|
|
20
|
+
return [currentId];
|
|
21
|
+
}
|
|
12
22
|
|
|
13
23
|
const { itemProps } = defineProps({
|
|
14
24
|
itemProps: { type: Object, required: true },
|
|
@@ -40,11 +50,11 @@ const modelVisibility = computed({
|
|
|
40
50
|
const modelComponentTypeVisibility = computed({
|
|
41
51
|
get: () => selection.value.includes(componentType.value),
|
|
42
52
|
set: async (newValue) => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
newValue,
|
|
53
|
+
const targetTypes = getBatchComponentIds(componentType.value);
|
|
54
|
+
const promises = targetTypes.map((type) =>
|
|
55
|
+
dataStyleStore.setModelComponentTypeVisibility(modelId.value, type, newValue),
|
|
47
56
|
);
|
|
57
|
+
await Promise.all(promises);
|
|
48
58
|
hybridViewerStore.remoteRender();
|
|
49
59
|
},
|
|
50
60
|
});
|
|
@@ -52,7 +62,8 @@ const modelComponentTypeVisibility = computed({
|
|
|
52
62
|
const componentVisibility = computed({
|
|
53
63
|
get: () => selection.value.includes(componentId.value),
|
|
54
64
|
set: async (newValue) => {
|
|
55
|
-
|
|
65
|
+
const targetIds = getBatchComponentIds(componentId.value);
|
|
66
|
+
await dataStyleStore.setModelComponentsVisibility(modelId.value, targetIds, newValue);
|
|
56
67
|
hybridViewerStore.remoteRender();
|
|
57
68
|
},
|
|
58
69
|
});
|
|
@@ -68,7 +79,8 @@ const componentColor = computed({
|
|
|
68
79
|
: undefined,
|
|
69
80
|
set: async (color) => {
|
|
70
81
|
if (componentId.value) {
|
|
71
|
-
|
|
82
|
+
const targetIds = getBatchComponentIds(componentId.value);
|
|
83
|
+
await dataStyleStore.setModelComponentsColor(modelId.value, targetIds, color);
|
|
72
84
|
hybridViewerStore.remoteRender();
|
|
73
85
|
}
|
|
74
86
|
},
|
|
@@ -81,7 +93,11 @@ const modelComponentTypeColor = computed({
|
|
|
81
93
|
: undefined,
|
|
82
94
|
set: async (color) => {
|
|
83
95
|
if (componentType.value) {
|
|
84
|
-
|
|
96
|
+
const targetTypes = getBatchComponentIds(componentType.value);
|
|
97
|
+
const promises = targetTypes.map((type) =>
|
|
98
|
+
dataStyleStore.setModelComponentTypeColor(modelId.value, type, color),
|
|
99
|
+
);
|
|
100
|
+
await Promise.all(promises);
|
|
85
101
|
hybridViewerStore.remoteRender();
|
|
86
102
|
}
|
|
87
103
|
},
|
|
@@ -91,11 +107,11 @@ const modelComponentTypeColorMode = computed({
|
|
|
91
107
|
get: () => dataStyleStore.getModelComponentTypeColorMode(modelId.value, componentType.value),
|
|
92
108
|
set: async (colorMode) => {
|
|
93
109
|
if (componentType.value) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
colorMode,
|
|
110
|
+
const targetTypes = getBatchComponentIds(componentType.value);
|
|
111
|
+
const promises = targetTypes.map((type) =>
|
|
112
|
+
dataStyleStore.setModelComponentTypeColorMode(modelId.value, type, colorMode),
|
|
98
113
|
);
|
|
114
|
+
await Promise.all(promises);
|
|
99
115
|
hybridViewerStore.remoteRender();
|
|
100
116
|
}
|
|
101
117
|
},
|
|
@@ -105,7 +121,11 @@ const componentColorMode = computed({
|
|
|
105
121
|
get: () => dataStyleStore.getModelComponentColorMode(modelId.value, componentId.value),
|
|
106
122
|
set: async (colorMode) => {
|
|
107
123
|
if (componentId.value) {
|
|
108
|
-
|
|
124
|
+
const targetIds = getBatchComponentIds(componentId.value);
|
|
125
|
+
const promises = targetIds.map((id) =>
|
|
126
|
+
dataStyleStore.setModelComponentColorMode(modelId.value, id, colorMode),
|
|
127
|
+
);
|
|
128
|
+
await Promise.all(promises);
|
|
109
129
|
hybridViewerStore.remoteRender();
|
|
110
130
|
}
|
|
111
131
|
},
|
|
@@ -4,11 +4,13 @@ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/Cont
|
|
|
4
4
|
import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size";
|
|
5
5
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
6
6
|
|
|
7
|
+
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
7
8
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
8
9
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
9
10
|
|
|
10
11
|
const dataStyleStore = useDataStyleStore();
|
|
11
12
|
const hybridViewerStore = useHybridViewerStore();
|
|
13
|
+
const { applyBatchStyle } = useBatchStyle();
|
|
12
14
|
|
|
13
15
|
const { itemProps } = defineProps({
|
|
14
16
|
itemProps: { type: Object, required: true },
|
|
@@ -19,14 +21,18 @@ const id = toRef(() => itemProps.id);
|
|
|
19
21
|
const visibility = computed({
|
|
20
22
|
get: () => dataStyleStore.modelPointsVisibility(id.value),
|
|
21
23
|
set: async (newValue) => {
|
|
22
|
-
await
|
|
24
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
25
|
+
dataStyleStore.setModelPointsVisibility(targetId, newValue),
|
|
26
|
+
);
|
|
23
27
|
hybridViewerStore.remoteRender();
|
|
24
28
|
},
|
|
25
29
|
});
|
|
26
30
|
const size = computed({
|
|
27
31
|
get: () => dataStyleStore.modelPointsSize(id.value),
|
|
28
32
|
set: async (newValue) => {
|
|
29
|
-
await
|
|
33
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
34
|
+
dataStyleStore.setModelPointsSize(targetId, newValue),
|
|
35
|
+
);
|
|
30
36
|
hybridViewerStore.remoteRender();
|
|
31
37
|
},
|
|
32
38
|
});
|
|
@@ -5,10 +5,11 @@ import { useTreeKeyboardNav } from "@ogw_front/composables/tree_keyboard_nav";
|
|
|
5
5
|
import { useTreeScroll } from "@ogw_front/composables/tree_scroll";
|
|
6
6
|
import { useVirtualTree } from "@ogw_front/composables/virtual_tree";
|
|
7
7
|
|
|
8
|
-
const { items, opened, selected, scrollTop, options } = defineProps({
|
|
8
|
+
const { items, opened, selected, active, scrollTop, options } = defineProps({
|
|
9
9
|
items: { type: Array, required: true },
|
|
10
10
|
opened: { type: Array, required: false, default: () => [] },
|
|
11
11
|
selected: { type: Array, required: false, default: () => [] },
|
|
12
|
+
active: { type: Array, required: false, default: () => [] },
|
|
12
13
|
scrollTop: { type: Number, required: false, default: 0 },
|
|
13
14
|
options: { type: Object, required: false, default: () => ({}) },
|
|
14
15
|
});
|
|
@@ -18,6 +19,7 @@ const treeWrapper = ref(undefined);
|
|
|
18
19
|
const emit = defineEmits([
|
|
19
20
|
"update:opened",
|
|
20
21
|
"update:selected",
|
|
22
|
+
"update:active",
|
|
21
23
|
"click:item",
|
|
22
24
|
"update:scrollTop",
|
|
23
25
|
"hover:enter",
|
|
@@ -37,6 +39,7 @@ const {
|
|
|
37
39
|
items,
|
|
38
40
|
opened,
|
|
39
41
|
selected,
|
|
42
|
+
active,
|
|
40
43
|
...options,
|
|
41
44
|
})),
|
|
42
45
|
emit,
|
|
@@ -49,11 +52,48 @@ const { virtualScrollRef, stickyHeader, handleScroll, scrollToIndex } = useTreeS
|
|
|
49
52
|
actualItemProps,
|
|
50
53
|
);
|
|
51
54
|
|
|
52
|
-
|
|
55
|
+
const lastActiveIndex = ref(-1);
|
|
56
|
+
|
|
57
|
+
function handleItemClick(item, index, event) {
|
|
53
58
|
if (index !== undefined) {
|
|
54
59
|
focusedIndex.value = index;
|
|
55
60
|
}
|
|
61
|
+
|
|
62
|
+
if (event && (event.ctrlKey || event.metaKey || event.shiftKey)) {
|
|
63
|
+
const newActive = new Set(active);
|
|
64
|
+
const id = item.raw[actualItemProps.value.value];
|
|
65
|
+
|
|
66
|
+
if (event.shiftKey && lastActiveIndex.value !== -1 && index !== undefined) {
|
|
67
|
+
const start = Math.min(lastActiveIndex.value, index);
|
|
68
|
+
const end = Math.max(lastActiveIndex.value, index);
|
|
69
|
+
for (let i = start; i <= end; i += 1) {
|
|
70
|
+
const rowItem = displayItems.value[i];
|
|
71
|
+
if (rowItem && rowItem.isLeaf) {
|
|
72
|
+
newActive.add(rowItem.raw[actualItemProps.value.value]);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
if (newActive.has(id)) {
|
|
77
|
+
newActive.delete(id);
|
|
78
|
+
} else {
|
|
79
|
+
newActive.add(id);
|
|
80
|
+
}
|
|
81
|
+
if (index !== undefined) {
|
|
82
|
+
lastActiveIndex.value = index;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
emit("update:active", [...newActive]);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Normal click
|
|
56
90
|
if (item.isLeaf) {
|
|
91
|
+
const newActive = [item.raw[actualItemProps.value.value]];
|
|
92
|
+
emit("update:active", newActive);
|
|
93
|
+
if (index !== undefined) {
|
|
94
|
+
lastActiveIndex.value = index;
|
|
95
|
+
}
|
|
96
|
+
|
|
57
97
|
toggleSelect(item.raw);
|
|
58
98
|
emit("click:item", item.raw);
|
|
59
99
|
} else {
|
|
@@ -104,13 +144,17 @@ const { focusedIndex, handleKeyDown } = useTreeKeyboardNav(
|
|
|
104
144
|
<v-list-item
|
|
105
145
|
:class="[
|
|
106
146
|
'tree-row-wrapper',
|
|
107
|
-
{
|
|
147
|
+
{
|
|
148
|
+
'leaf-row': item.isLeaf,
|
|
149
|
+
'is-focused': focusedIndex === index,
|
|
150
|
+
'is-active': item.isActive,
|
|
151
|
+
},
|
|
108
152
|
]"
|
|
109
153
|
class="pa-0"
|
|
110
154
|
tabindex="-1"
|
|
111
155
|
@mousedown.prevent
|
|
112
156
|
@click="
|
|
113
|
-
handleItemClick(item, index);
|
|
157
|
+
handleItemClick(item, index, $event);
|
|
114
158
|
treeWrapper.focus();
|
|
115
159
|
"
|
|
116
160
|
@mouseenter="emit('hover:enter', { item })"
|
|
@@ -176,7 +220,11 @@ const { focusedIndex, handleKeyDown } = useTreeKeyboardNav(
|
|
|
176
220
|
box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.15);
|
|
177
221
|
}
|
|
178
222
|
|
|
179
|
-
.tree-row-wrapper
|
|
223
|
+
.tree-row-wrapper.is-active {
|
|
224
|
+
background-color: rgba(0, 0, 0, 0.08) !important;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.tree-row-wrapper:hover:not(.is-focused):not(.is-active) {
|
|
180
228
|
background-color: rgba(0, 0, 0, 0.04) !important;
|
|
181
229
|
}
|
|
182
230
|
|
|
@@ -160,6 +160,7 @@ function getLeafViewerIds(item) {
|
|
|
160
160
|
<CommonTreeView
|
|
161
161
|
:selected="visibleSelection"
|
|
162
162
|
v-model:opened="opened"
|
|
163
|
+
v-model:active="treeviewStore.activeItems"
|
|
163
164
|
:items="itemsForTreeView"
|
|
164
165
|
:options="{
|
|
165
166
|
selection: { selectable: true, strategy: 'classic' },
|
|
@@ -151,6 +151,7 @@ function expandAll() {
|
|
|
151
151
|
<CommonTreeView
|
|
152
152
|
:selected="visibleSelection"
|
|
153
153
|
v-model:opened="opened"
|
|
154
|
+
v-model:active="treeviewStore.activeItems"
|
|
154
155
|
:items="itemsForTreeView"
|
|
155
156
|
:options="{
|
|
156
157
|
selection: { selectable: true, strategy: 'classic' },
|
|
@@ -4,11 +4,13 @@ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/Cont
|
|
|
4
4
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector";
|
|
5
5
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
6
6
|
|
|
7
|
+
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
7
8
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
8
9
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
9
10
|
|
|
10
11
|
const dataStyleStore = useDataStyleStore();
|
|
11
12
|
const hybridViewerStore = useHybridViewerStore();
|
|
13
|
+
const { applyBatchStyle } = useBatchStyle();
|
|
12
14
|
|
|
13
15
|
const { itemProps } = defineProps({
|
|
14
16
|
itemProps: { type: Object, required: true },
|
|
@@ -19,49 +21,63 @@ const id = toRef(() => itemProps.id);
|
|
|
19
21
|
const visibility = computed({
|
|
20
22
|
get: () => dataStyleStore.meshPointsVisibility(id.value),
|
|
21
23
|
set: async (newValue) => {
|
|
22
|
-
await
|
|
24
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
25
|
+
dataStyleStore.setMeshPointsVisibility(targetId, newValue),
|
|
26
|
+
);
|
|
23
27
|
hybridViewerStore.remoteRender();
|
|
24
28
|
},
|
|
25
29
|
});
|
|
26
30
|
const size = computed({
|
|
27
31
|
get: () => dataStyleStore.meshPointsSize(id.value),
|
|
28
32
|
set: async (newValue) => {
|
|
29
|
-
await
|
|
33
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
34
|
+
dataStyleStore.setMeshPointsSize(targetId, newValue),
|
|
35
|
+
);
|
|
30
36
|
hybridViewerStore.remoteRender();
|
|
31
37
|
},
|
|
32
38
|
});
|
|
33
39
|
const coloring_style_key = computed({
|
|
34
40
|
get: () => dataStyleStore.meshPointsActiveColoring(id.value),
|
|
35
41
|
set: async (newValue) => {
|
|
36
|
-
await
|
|
42
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
43
|
+
dataStyleStore.setMeshPointsActiveColoring(targetId, newValue),
|
|
44
|
+
);
|
|
37
45
|
hybridViewerStore.remoteRender();
|
|
38
46
|
},
|
|
39
47
|
});
|
|
40
48
|
const color = computed({
|
|
41
49
|
get: () => dataStyleStore.meshPointsColor(id.value),
|
|
42
50
|
set: async (newValue) => {
|
|
43
|
-
await
|
|
51
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
52
|
+
dataStyleStore.setMeshPointsColor(targetId, newValue),
|
|
53
|
+
);
|
|
44
54
|
hybridViewerStore.remoteRender();
|
|
45
55
|
},
|
|
46
56
|
});
|
|
47
57
|
const vertex_attribute_name = computed({
|
|
48
58
|
get: () => dataStyleStore.meshPointsVertexAttributeName(id.value),
|
|
49
59
|
set: async (newValue) => {
|
|
50
|
-
await
|
|
60
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
61
|
+
dataStyleStore.setMeshPointsVertexAttributeName(targetId, newValue),
|
|
62
|
+
);
|
|
51
63
|
hybridViewerStore.remoteRender();
|
|
52
64
|
},
|
|
53
65
|
});
|
|
54
66
|
const vertex_attribute_range = computed({
|
|
55
67
|
get: () => dataStyleStore.meshPointsVertexAttributeRange(id.value),
|
|
56
68
|
set: async (newValue) => {
|
|
57
|
-
await
|
|
69
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
70
|
+
dataStyleStore.setMeshPointsVertexAttributeRange(targetId, newValue[0], newValue[1]),
|
|
71
|
+
);
|
|
58
72
|
hybridViewerStore.remoteRender();
|
|
59
73
|
},
|
|
60
74
|
});
|
|
61
75
|
const vertex_attribute_color_map = computed({
|
|
62
76
|
get: () => dataStyleStore.meshPointsVertexAttributeColorMap(id.value),
|
|
63
77
|
set: async (newValue) => {
|
|
64
|
-
await
|
|
78
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
79
|
+
dataStyleStore.setMeshPointsVertexAttributeColorMap(targetId, newValue),
|
|
80
|
+
);
|
|
65
81
|
hybridViewerStore.remoteRender();
|
|
66
82
|
},
|
|
67
83
|
});
|
|
@@ -4,11 +4,13 @@ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/Cont
|
|
|
4
4
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector";
|
|
5
5
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
6
6
|
|
|
7
|
+
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
7
8
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
8
9
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
9
10
|
|
|
10
11
|
const dataStyleStore = useDataStyleStore();
|
|
11
12
|
const hybridViewerStore = useHybridViewerStore();
|
|
13
|
+
const { applyBatchStyle } = useBatchStyle();
|
|
12
14
|
|
|
13
15
|
const { itemProps } = defineProps({
|
|
14
16
|
itemProps: { type: Object, required: true },
|
|
@@ -20,49 +22,63 @@ const id = toRef(() => itemProps.id);
|
|
|
20
22
|
const visibility = computed({
|
|
21
23
|
get: () => dataStyleStore.meshPolyhedraVisibility(id.value),
|
|
22
24
|
set: async (newValue) => {
|
|
23
|
-
await
|
|
25
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
26
|
+
dataStyleStore.setMeshPolyhedraVisibility(targetId, newValue),
|
|
27
|
+
);
|
|
24
28
|
hybridViewerStore.remoteRender();
|
|
25
29
|
},
|
|
26
30
|
});
|
|
27
31
|
const coloring_style_key = computed({
|
|
28
32
|
get: () => dataStyleStore.meshPolyhedraActiveColoring(id.value),
|
|
29
33
|
set: async (newValue) => {
|
|
30
|
-
await
|
|
34
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
35
|
+
dataStyleStore.setMeshPolyhedraActiveColoring(targetId, newValue),
|
|
36
|
+
);
|
|
31
37
|
hybridViewerStore.remoteRender();
|
|
32
38
|
},
|
|
33
39
|
});
|
|
34
40
|
const color = computed({
|
|
35
41
|
get: () => dataStyleStore.meshPolyhedraColor(id.value),
|
|
36
42
|
set: async (newValue) => {
|
|
37
|
-
await
|
|
43
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
44
|
+
dataStyleStore.setMeshPolyhedraColor(targetId, newValue),
|
|
45
|
+
);
|
|
38
46
|
hybridViewerStore.remoteRender();
|
|
39
47
|
},
|
|
40
48
|
});
|
|
41
49
|
const vertex_attribute_name = computed({
|
|
42
50
|
get: () => dataStyleStore.meshPolyhedraVertexAttributeName(id.value),
|
|
43
51
|
set: async (newValue) => {
|
|
44
|
-
await
|
|
52
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
53
|
+
dataStyleStore.setMeshPolyhedraVertexAttributeName(targetId, newValue),
|
|
54
|
+
);
|
|
45
55
|
hybridViewerStore.remoteRender();
|
|
46
56
|
},
|
|
47
57
|
});
|
|
48
58
|
const vertex_attribute_range = computed({
|
|
49
59
|
get: () => dataStyleStore.meshPolyhedraVertexAttributeRange(id.value),
|
|
50
60
|
set: async (newValue) => {
|
|
51
|
-
await
|
|
61
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
62
|
+
dataStyleStore.setMeshPolyhedraVertexAttributeRange(targetId, newValue[0], newValue[1]),
|
|
63
|
+
);
|
|
52
64
|
hybridViewerStore.remoteRender();
|
|
53
65
|
},
|
|
54
66
|
});
|
|
55
67
|
const vertex_attribute_color_map = computed({
|
|
56
68
|
get: () => dataStyleStore.meshPolyhedraVertexAttributeColorMap(id.value),
|
|
57
69
|
set: async (newValue) => {
|
|
58
|
-
await
|
|
70
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
71
|
+
dataStyleStore.setMeshPolyhedraVertexAttributeColorMap(targetId, newValue),
|
|
72
|
+
);
|
|
59
73
|
hybridViewerStore.remoteRender();
|
|
60
74
|
},
|
|
61
75
|
});
|
|
62
76
|
const polyhedron_attribute_name = computed({
|
|
63
77
|
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeName(id.value),
|
|
64
78
|
set: async (newValue) => {
|
|
65
|
-
await
|
|
79
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
80
|
+
dataStyleStore.setMeshPolyhedraPolyhedronAttributeName(targetId, newValue),
|
|
81
|
+
);
|
|
66
82
|
hybridViewerStore.remoteRender();
|
|
67
83
|
},
|
|
68
84
|
});
|
|
@@ -80,7 +96,9 @@ const polyhedron_attribute_range = computed({
|
|
|
80
96
|
const polyhedron_attribute_color_map = computed({
|
|
81
97
|
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeColorMap(id.value),
|
|
82
98
|
set: async (newValue) => {
|
|
83
|
-
await
|
|
99
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
100
|
+
dataStyleStore.setMeshPolyhedraPolyhedronAttributeColorMap(targetId, newValue),
|
|
101
|
+
);
|
|
84
102
|
hybridViewerStore.remoteRender();
|
|
85
103
|
},
|
|
86
104
|
});
|
|
@@ -4,11 +4,13 @@ import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/Cont
|
|
|
4
4
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector";
|
|
5
5
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
6
6
|
|
|
7
|
+
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
7
8
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
8
9
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
9
10
|
|
|
10
11
|
const dataStyleStore = useDataStyleStore();
|
|
11
12
|
const hybridViewerStore = useHybridViewerStore();
|
|
13
|
+
const { applyBatchStyle } = useBatchStyle();
|
|
12
14
|
|
|
13
15
|
const { itemProps } = defineProps({
|
|
14
16
|
itemProps: { type: Object, required: true },
|
|
@@ -20,70 +22,90 @@ const id = toRef(() => itemProps.id);
|
|
|
20
22
|
const visibility = computed({
|
|
21
23
|
get: () => dataStyleStore.meshPolygonsVisibility(id.value),
|
|
22
24
|
set: async (newValue) => {
|
|
23
|
-
await
|
|
25
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
26
|
+
dataStyleStore.setMeshPolygonsVisibility(targetId, newValue),
|
|
27
|
+
);
|
|
24
28
|
hybridViewerStore.remoteRender();
|
|
25
29
|
},
|
|
26
30
|
});
|
|
27
31
|
const coloring_style_key = computed({
|
|
28
32
|
get: () => dataStyleStore.meshPolygonsActiveColoring(id.value),
|
|
29
33
|
set: async (newValue) => {
|
|
30
|
-
await
|
|
34
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
35
|
+
dataStyleStore.setMeshPolygonsActiveColoring(targetId, newValue),
|
|
36
|
+
);
|
|
31
37
|
hybridViewerStore.remoteRender();
|
|
32
38
|
},
|
|
33
39
|
});
|
|
34
40
|
const color = computed({
|
|
35
41
|
get: () => dataStyleStore.meshPolygonsColor(id.value),
|
|
36
42
|
set: async (newValue) => {
|
|
37
|
-
await
|
|
43
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
44
|
+
dataStyleStore.setMeshPolygonsColor(targetId, newValue),
|
|
45
|
+
);
|
|
38
46
|
hybridViewerStore.remoteRender();
|
|
39
47
|
},
|
|
40
48
|
});
|
|
41
49
|
const textures = computed({
|
|
42
50
|
get: () => dataStyleStore.meshPolygonsTextures(id.value),
|
|
43
51
|
set: async (newValue) => {
|
|
44
|
-
await
|
|
52
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
53
|
+
dataStyleStore.setMeshPolygonsTextures(targetId, newValue),
|
|
54
|
+
);
|
|
45
55
|
hybridViewerStore.remoteRender();
|
|
46
56
|
},
|
|
47
57
|
});
|
|
48
58
|
const vertex_attribute_name = computed({
|
|
49
59
|
get: () => dataStyleStore.meshPolygonsVertexAttributeName(id.value),
|
|
50
60
|
set: async (newValue) => {
|
|
51
|
-
await
|
|
61
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
62
|
+
dataStyleStore.setMeshPolygonsVertexAttributeName(targetId, newValue),
|
|
63
|
+
);
|
|
52
64
|
hybridViewerStore.remoteRender();
|
|
53
65
|
},
|
|
54
66
|
});
|
|
55
67
|
const vertex_attribute_range = computed({
|
|
56
68
|
get: () => dataStyleStore.meshPolygonsVertexAttributeRange(id.value),
|
|
57
69
|
set: async (newValue) => {
|
|
58
|
-
await
|
|
70
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
71
|
+
dataStyleStore.setMeshPolygonsVertexAttributeRange(targetId, newValue[0], newValue[1]),
|
|
72
|
+
);
|
|
59
73
|
hybridViewerStore.remoteRender();
|
|
60
74
|
},
|
|
61
75
|
});
|
|
62
76
|
const vertex_attribute_color_map = computed({
|
|
63
77
|
get: () => dataStyleStore.meshPolygonsVertexAttributeColorMap(id.value),
|
|
64
78
|
set: async (newValue) => {
|
|
65
|
-
await
|
|
79
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
80
|
+
dataStyleStore.setMeshPolygonsVertexAttributeColorMap(targetId, newValue),
|
|
81
|
+
);
|
|
66
82
|
hybridViewerStore.remoteRender();
|
|
67
83
|
},
|
|
68
84
|
});
|
|
69
85
|
const polygon_attribute_name = computed({
|
|
70
86
|
get: () => dataStyleStore.meshPolygonsPolygonAttributeName(id.value),
|
|
71
87
|
set: async (newValue) => {
|
|
72
|
-
await
|
|
88
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
89
|
+
dataStyleStore.setMeshPolygonsPolygonAttributeName(targetId, newValue),
|
|
90
|
+
);
|
|
73
91
|
hybridViewerStore.remoteRender();
|
|
74
92
|
},
|
|
75
93
|
});
|
|
76
94
|
const polygon_attribute_range = computed({
|
|
77
95
|
get: () => dataStyleStore.meshPolygonsPolygonAttributeRange(id.value),
|
|
78
96
|
set: async (newValue) => {
|
|
79
|
-
await
|
|
97
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
98
|
+
dataStyleStore.setMeshPolygonsPolygonAttributeRange(targetId, newValue[0], newValue[1]),
|
|
99
|
+
);
|
|
80
100
|
hybridViewerStore.remoteRender();
|
|
81
101
|
},
|
|
82
102
|
});
|
|
83
103
|
const polygon_attribute_color_map = computed({
|
|
84
104
|
get: () => dataStyleStore.meshPolygonsPolygonAttributeColorMap(id.value),
|
|
85
105
|
set: async (newValue) => {
|
|
86
|
-
await
|
|
106
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
107
|
+
dataStyleStore.setMeshPolygonsPolygonAttributeColorMap(targetId, newValue),
|
|
108
|
+
);
|
|
87
109
|
hybridViewerStore.remoteRender();
|
|
88
110
|
},
|
|
89
111
|
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useDataStore } from "@ogw_front/stores/data";
|
|
2
|
+
import { useTreeviewStore } from "@ogw_front/stores/treeview";
|
|
3
|
+
|
|
4
|
+
export function useBatchStyle() {
|
|
5
|
+
const treeviewStore = useTreeviewStore();
|
|
6
|
+
const dataStore = useDataStore();
|
|
7
|
+
|
|
8
|
+
async function applyBatchStyle(id, action) {
|
|
9
|
+
const isActive = treeviewStore.activeItems.includes(id);
|
|
10
|
+
if (!isActive || treeviewStore.activeItems.length <= 1) {
|
|
11
|
+
await action(id);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
const currentItem = await dataStore.item(id);
|
|
17
|
+
const targetType = currentItem.geode_object_type;
|
|
18
|
+
|
|
19
|
+
const promises = treeviewStore.activeItems.map(async (selectedId) => {
|
|
20
|
+
try {
|
|
21
|
+
const item = await dataStore.item(selectedId);
|
|
22
|
+
if (item && item.geode_object_type === targetType) {
|
|
23
|
+
await action(selectedId);
|
|
24
|
+
}
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.error("Failed to apply batch style to item", selectedId, error);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
await Promise.all(promises);
|
|
31
|
+
} catch (error) {
|
|
32
|
+
console.error("Failed to fetch current item for batch style", id, error);
|
|
33
|
+
await action(id);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return { applyBatchStyle };
|
|
38
|
+
}
|
|
@@ -17,6 +17,7 @@ export function useVirtualTree(propsIn, emit) {
|
|
|
17
17
|
|
|
18
18
|
const openedSet = computed(() => new Set(props.value.opened));
|
|
19
19
|
const selectedSet = computed(() => new Set(props.value.selected));
|
|
20
|
+
const activeSet = computed(() => new Set(props.value.active || []));
|
|
20
21
|
|
|
21
22
|
function toggleOpen(item) {
|
|
22
23
|
const id = item[actualItemProps.value.value];
|
|
@@ -106,6 +107,7 @@ export function useVirtualTree(propsIn, emit) {
|
|
|
106
107
|
const hasChildren = children && children.length > 0;
|
|
107
108
|
|
|
108
109
|
const isOpen = openedSet.value.has(id);
|
|
110
|
+
const isActive = activeSet.value.has(id);
|
|
109
111
|
|
|
110
112
|
if (lowerSearch) {
|
|
111
113
|
const matches = customFilter
|
|
@@ -125,6 +127,7 @@ export function useVirtualTree(propsIn, emit) {
|
|
|
125
127
|
id,
|
|
126
128
|
depth,
|
|
127
129
|
isOpen,
|
|
130
|
+
isActive,
|
|
128
131
|
isLeaf: false,
|
|
129
132
|
});
|
|
130
133
|
if (isOpen) {
|
|
@@ -142,6 +145,7 @@ export function useVirtualTree(propsIn, emit) {
|
|
|
142
145
|
id,
|
|
143
146
|
depth,
|
|
144
147
|
isOpen,
|
|
148
|
+
isActive,
|
|
145
149
|
isLeaf: !hasChildren,
|
|
146
150
|
});
|
|
147
151
|
|
package/app/stores/treeview.js
CHANGED
|
@@ -9,6 +9,7 @@ const PANEL_WIDTH = 300;
|
|
|
9
9
|
export const useTreeviewStore = defineStore("treeview", () => {
|
|
10
10
|
const items = ref([]);
|
|
11
11
|
const selection = ref([]);
|
|
12
|
+
const activeItems = ref([]);
|
|
12
13
|
const opened_views = ref([
|
|
13
14
|
{ type: "object", id: "main", title: "Objects", scrollTop: 0, opened: [] },
|
|
14
15
|
]);
|
|
@@ -192,6 +193,7 @@ export const useTreeviewStore = defineStore("treeview", () => {
|
|
|
192
193
|
function clear() {
|
|
193
194
|
items.value = [];
|
|
194
195
|
selection.value = [];
|
|
196
|
+
activeItems.value = [];
|
|
195
197
|
pendingSelectionIds.value = [];
|
|
196
198
|
opened_views.value = [
|
|
197
199
|
{ type: "object", id: "main", title: "Objects", scrollTop: 0, opened: [] },
|
|
@@ -261,6 +263,7 @@ export const useTreeviewStore = defineStore("treeview", () => {
|
|
|
261
263
|
return {
|
|
262
264
|
items,
|
|
263
265
|
selection,
|
|
266
|
+
activeItems,
|
|
264
267
|
opened_views,
|
|
265
268
|
panelWidth,
|
|
266
269
|
additionalPanelWidth,
|
package/package.json
CHANGED