Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/components/Viewer/ContextMenu/ContextMenuItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ function toggleOptions() {
@click.stop="toggleOptions"
v-bind="tooltipProps"
class="menu-btn"
:data-testid="is_active ? 'activeCircularMenuItemButton' : 'circularMenuItemButton'"
elevation="2"
:style="computedItemStyles"
>
Expand Down
14 changes: 14 additions & 0 deletions app/components/Viewer/Options/ColorMapList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const filterText = ref("");
const canvasRefs = ref({});
const loading = ref(true);
const renderJobId = ref(0);
const openedGroups = ref([]);

function setCanvasRef(presetName, element, id) {
if (element) {
Expand Down Expand Up @@ -44,6 +45,18 @@ const filteredPresets = computed(() => {
return result;
});

watch(
[filterText, filteredPresets],
() => {
if (filterText.value) {
openedGroups.value = filteredPresets.value
.filter((item) => item.Children)
.map((item) => item.Name);
}
},
{ immediate: true },
);

function processChunk(entries, index, jobId) {
if (jobId !== renderJobId.value || index >= entries.length) {
if (jobId === renderJobId.value) {
Expand Down Expand Up @@ -103,6 +116,7 @@ watch(filteredPresets, drawAllCanvases);
/>

<v-list
v-model:opened="openedGroups"
data-testid="colorMapList"
density="compact"
max-height="350"
Expand Down
4 changes: 2 additions & 2 deletions internal/stores/data_style/model/blocks/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export function useModelBlocksColor() {
}

async function setModelBlocksActiveColoring(modelId, blocks_ids, activeColoring) {
await modelCommonStyle.mutateComponentStyles(modelId, blocks_ids, {
coloring: { active: activeColoring },
await modelBlocksCommonStyle.mutateModelBlocksColoring(modelId, blocks_ids, {
active: activeColoring,
});
if (activeColoring === "constant" || activeColoring === "random") {
const color = modelBlockColor(modelId, blocks_ids[0]);
Expand Down
3 changes: 3 additions & 0 deletions internal/stores/data_style/model/blocks/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export function useModelBlocksCommonStyle() {
}

function mutateModelBlocksColoring(id, blocks_ids, values) {
modelCommonStyle.mutateModelComponentTypeStyle(id, "Block", {
coloring: values,
});
return modelCommonStyle.mutateComponentStyles(id, blocks_ids, {
coloring: values,
});
Expand Down
4 changes: 2 additions & 2 deletions internal/stores/data_style/model/corners/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export function useModelCornersColor() {
}

async function setModelCornersActiveColoring(modelId, corners_ids, activeColoring) {
await modelCommonStyle.mutateComponentStyles(modelId, corners_ids, {
coloring: { active: activeColoring },
await modelCornersCommonStyle.mutateModelCornersColoring(modelId, corners_ids, {
active: activeColoring,
});
if (activeColoring === "constant" || activeColoring === "random") {
const color = modelCornerColor(modelId, corners_ids[0]);
Expand Down
3 changes: 3 additions & 0 deletions internal/stores/data_style/model/corners/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export function useModelCornersCommonStyle() {
}

function mutateModelCornersColoring(id, corners_ids, values) {
modelCommonStyle.mutateModelComponentTypeStyle(id, "Corner", {
coloring: values,
});
return modelCommonStyle.mutateComponentStyles(id, corners_ids, {
coloring: values,
});
Expand Down
4 changes: 2 additions & 2 deletions internal/stores/data_style/model/lines/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export function useModelLinesColor() {
}

async function setModelLinesActiveColoring(modelId, lines_ids, activeColoring) {
await modelCommonStyle.mutateComponentStyles(modelId, lines_ids, {
coloring: { active: activeColoring },
await modelLinesCommonStyle.mutateModelLinesColoring(modelId, lines_ids, {
active: activeColoring,
});
if (activeColoring === "constant" || activeColoring === "random") {
const color = modelLineColor(modelId, lines_ids[0]);
Expand Down
3 changes: 3 additions & 0 deletions internal/stores/data_style/model/lines/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export function useModelLinesCommonStyle() {
}

function mutateModelLinesColoring(id, lines_ids, values) {
modelCommonStyle.mutateModelComponentTypeStyle(id, "Line", {
coloring: values,
});
return modelCommonStyle.mutateComponentStyles(id, lines_ids, {
coloring: values,
});
Expand Down
4 changes: 2 additions & 2 deletions internal/stores/data_style/model/surfaces/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export function useModelSurfacesColor() {
}

async function setModelSurfacesActiveColoring(modelId, surfaces_ids, activeColoring) {
await modelCommonStyle.mutateComponentStyles(modelId, surfaces_ids, {
coloring: { active: activeColoring },
await modelSurfacesCommonStyle.mutateModelSurfacesColoring(modelId, surfaces_ids, {
active: activeColoring,
});
if (activeColoring === "constant" || activeColoring === "random") {
const color = modelSurfaceColor(modelId, surfaces_ids[0]);
Expand Down
3 changes: 3 additions & 0 deletions internal/stores/data_style/model/surfaces/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export function useModelSurfacesCommonStyle() {
}

function mutateModelSurfacesColoring(id, surfaces_ids, values) {
modelCommonStyle.mutateModelComponentTypeStyle(id, "Surface", {
coloring: values,
});
return modelCommonStyle.mutateComponentStyles(id, surfaces_ids, {
coloring: values,
});
Expand Down
Loading