diff --git a/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue b/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue index c82938b1..f937e125 100644 --- a/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +++ b/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue @@ -44,22 +44,87 @@ hybridViewerStore.remoteRender() }, }) - const vertex_attribute = computed({ - get: () => dataStyleStore.meshEdgesVertexAttribute(id.value), + const vertex_attribute_name = computed({ + get: () => dataStyleStore.meshEdgesVertexAttributeName(id.value), set: (newValue) => { - dataStyleStore.setMeshEdgesVertexAttribute(id.value, newValue) + dataStyleStore.setMeshEdgesVertexAttributeName(id.value, newValue) hybridViewerStore.remoteRender() }, }) - const edge_attribute = computed({ - get: () => dataStyleStore.meshEdgesEdgeAttribute(id.value), + const vertex_attribute_range = computed({ + get: () => dataStyleStore.meshEdgesVertexAttributeRange(id.value), set: (newValue) => { - dataStyleStore.setMeshEdgesEdgeAttribute(id.value, newValue) + dataStyleStore.setMeshEdgesVertexAttributeRange( + id.value, + newValue[0], + newValue[1], + ) + const colorMap = dataStyleStore.meshEdgesVertexAttributeColorMap(id.value) + if (colorMap) { + dataStyleStore.setMeshEdgesVertexAttributeColorMap( + id.value, + colorMap, + newValue[0], + newValue[1], + ) + } + hybridViewerStore.remoteRender() + }, + }) + const vertex_attribute_color_map = computed({ + get: () => dataStyleStore.meshEdgesVertexAttributeColorMap(id.value), + set: (newValue) => { + const range = dataStyleStore.meshEdgesVertexAttributeRange(id.value) + dataStyleStore.setMeshEdgesVertexAttributeColorMap( + id.value, + newValue, + range[0], + range[1], + ) + hybridViewerStore.remoteRender() + }, + }) + const edge_attribute_name = computed({ + get: () => dataStyleStore.meshEdgesEdgeAttributeName(id.value), + set: (newValue) => { + dataStyleStore.setMeshEdgesEdgeAttributeName(id.value, newValue) + hybridViewerStore.remoteRender() + }, + }) + const edge_attribute_range = computed({ + get: () => dataStyleStore.meshEdgesEdgeAttributeRange(id.value), + set: (newValue) => { + dataStyleStore.setMeshEdgesEdgeAttributeRange( + id.value, + newValue[0], + newValue[1], + ) + const colorMap = dataStyleStore.meshEdgesEdgeAttributeColorMap(id.value) + if (colorMap) { + dataStyleStore.setMeshEdgesEdgeAttributeColorMap( + id.value, + colorMap, + newValue[0], + newValue[1], + ) + } + hybridViewerStore.remoteRender() + }, + }) + const edge_attribute_color_map = computed({ + get: () => dataStyleStore.meshEdgesEdgeAttributeColorMap(id.value), + set: (newValue) => { + const range = dataStyleStore.meshEdgesEdgeAttributeRange(id.value) + dataStyleStore.setMeshEdgesEdgeAttributeColorMap( + id.value, + newValue, + range[0], + range[1], + ) hybridViewerStore.remoteRender() }, }) - diff --git a/app/components/Viewer/Generic/Mesh/EdgesOptions.vue b/app/components/Viewer/Generic/Mesh/EdgesOptions.vue index 02fe857e..beac6e5b 100644 --- a/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +++ b/app/components/Viewer/Generic/Mesh/EdgesOptions.vue @@ -44,15 +44,7 @@ hybridViewerStore.remoteRender() }, }) - const vertex_attribute = computed({ - get: () => dataStyleStore.meshEdgesVertexAttribute(id.value), - set: (newValue) => { - dataStyleStore.setMeshEdgesVertexAttribute(id.value, newValue) - hybridViewerStore.remoteRender() - }, - }) -