@geode/opengeodeweb-front 10.20.0-rc.5 → 10.20.1-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.
@@ -119,17 +119,68 @@ const colorModes = [
119
119
  const modelComponentTypeLabel = computed(() =>
120
120
  componentType.value ? `${componentType.value}s Options` : "",
121
121
  );
122
+
123
+ const modelComponentsColorMode = ref("constant");
124
+
125
+ const modelComponentsColor = computed({
126
+ get: () => {
127
+ if (selection.value.length > 0) {
128
+ return dataStyleStore.getModelComponentColor(modelId.value, selection.value[0]);
129
+ }
130
+ return { red: 255, green: 255, blue: 255 };
131
+ },
132
+ set: async (color) => {
133
+ if (selection.value.length > 0) {
134
+ await dataStyleStore.setModelComponentsColor(
135
+ modelId.value,
136
+ selection.value,
137
+ color,
138
+ modelComponentsColorMode.value,
139
+ );
140
+ hybridViewerStore.remoteRender();
141
+ }
142
+ },
143
+ });
144
+
145
+ watch(modelComponentsColorMode, async (colorMode) => {
146
+ if (colorMode === "random" && selection.value.length > 0) {
147
+ await dataStyleStore.setModelComponentsColor(
148
+ modelId.value,
149
+ selection.value,
150
+ undefined,
151
+ colorMode,
152
+ );
153
+ hybridViewerStore.remoteRender();
154
+ }
155
+ });
122
156
  </script>
123
157
 
124
158
  <template>
125
- <div class="model-style-card">
159
+ <v-sheet class="model-style-card" color="transparent">
126
160
  <OptionsSection title="Model Options">
127
161
  <VisibilitySwitch v-model="modelVisibility" />
128
162
  </OptionsSection>
129
163
 
164
+ <OptionsSection v-if="!componentType && !componentId" title="Components Options" class="mt-6">
165
+ <v-label class="text-caption mb-1 mt-2">Color Mode</v-label>
166
+ <v-select
167
+ v-model="modelComponentsColorMode"
168
+ :items="colorModes"
169
+ density="compact"
170
+ hide-details
171
+ class="mb-3"
172
+ variant="outlined"
173
+ />
174
+
175
+ <template v-if="modelComponentsColorMode === 'constant'">
176
+ <v-label class="text-caption mb-1">Color</v-label>
177
+ <ViewerOptionsColorPicker v-model="modelComponentsColor" />
178
+ </template>
179
+ </OptionsSection>
180
+
130
181
  <OptionsSection v-if="componentType" :title="modelComponentTypeLabel" class="mt-6">
131
182
  <VisibilitySwitch v-model="modelComponentTypeVisibility" />
132
- <div class="text-caption mb-1 mt-2">Color Mode</div>
183
+ <v-label class="text-caption mb-1 mt-2">Color Mode</v-label>
133
184
  <v-select
134
185
  v-model="modelComponentTypeColorMode"
135
186
  :items="colorModes"
@@ -140,14 +191,14 @@ const modelComponentTypeLabel = computed(() =>
140
191
  />
141
192
 
142
193
  <template v-if="modelComponentTypeColorMode === 'constant'">
143
- <div class="text-caption mb-1">Color</div>
194
+ <v-label class="text-caption mb-1">Color</v-label>
144
195
  <ViewerOptionsColorPicker v-model="modelComponentTypeColor" />
145
196
  </template>
146
197
  </OptionsSection>
147
198
 
148
199
  <OptionsSection v-if="componentId" title="Component Options" class="mt-6">
149
200
  <VisibilitySwitch v-model="componentVisibility" />
150
- <div class="text-caption mb-1 mt-2">Color Mode</div>
201
+ <v-label class="text-caption mb-1 mt-2">Color Mode</v-label>
151
202
  <v-select
152
203
  v-model="componentColorMode"
153
204
  :items="colorModes"
@@ -158,11 +209,11 @@ const modelComponentTypeLabel = computed(() =>
158
209
  />
159
210
 
160
211
  <template v-if="componentColorMode === 'constant'">
161
- <div class="text-caption mb-1">Color</div>
212
+ <v-label class="text-caption mb-1">Color</v-label>
162
213
  <ViewerOptionsColorPicker v-model="componentColor" />
163
214
  </template>
164
215
  </OptionsSection>
165
- </div>
216
+ </v-sheet>
166
217
  </template>
167
218
 
168
219
  <style scoped>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.20.0-rc.5",
3
+ "version": "10.20.1-rc.1",
4
4
  "description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
5
5
  "homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
6
6
  "bugs": {