-
Notifications
You must be signed in to change notification settings - Fork 2
Fix/context menu edged curve #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Changes from all commits
ce85c5f
2d6602f
3e41187
f345282
b62ac64
24c9ed2
9910556
36ff777
0eec864
74d69f5
935eadf
19e2343
60497f9
1bbe450
810daaf
1515c5f
7729dc1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,17 @@ | ||
| <template> | ||
| <ViewerGenericMeshEdgesOptions | ||
| <ViewerSpecificEdgesOptions | ||
| :itemProps="props.itemProps" | ||
| :btn_image="EdgedCurveEdges" | ||
| :index="props.index" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Le index il sert à quoi ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. C’est de la PR de Tao pour ne pas que les éléments du contexte nu ne se chevauchent de ce que j'ai compris
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. C’est de la PR de Tao pour ne pas que les éléments du contexte nu ne se chevauchent de ce que j'ai compris |
||
| /> | ||
| </template> | ||
|
|
||
| <script setup> | ||
| import ViewerGenericMeshEdgesOptions from "@ogw_front/components/Viewer/Generic/Mesh/EdgesOptions" | ||
| import ViewerSpecificEdgesOptions from "@ogw_front/components/Viewer/EdgedCurve/SpecificEdgesOptions" | ||
| import EdgedCurveEdges from "@ogw_front/assets/viewer_svgs/edged_curve_edges.svg" | ||
| const props = defineProps({ | ||
| itemProps: { type: Object, required: true }, | ||
| index: { type: Number, required: true }, | ||
| }) | ||
| </script> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| <template> | ||
| <ViewerContextMenuItem | ||
| :itemProps="props.itemProps" | ||
| tooltip="Edges options" | ||
| :btn_image="props.btn_image" | ||
| :index="props.index" | ||
| > | ||
| <template #options> | ||
| <ViewerOptionsVisibilitySwitch v-model="visibility" /> | ||
| <template v-if="visibility"> | ||
| <v-row class="pa-0" align="center"> | ||
| <v-divider /> | ||
| <v-col cols="auto" justify="center"> | ||
| <v-icon size="30" icon="mdi-ruler" v-tooltip:left="'Width'" /> | ||
| </v-col> | ||
| <v-col justify="center"> | ||
| <v-slider | ||
| v-model="size" | ||
| hide-details | ||
| min="0" | ||
| max="20" | ||
| step="2" | ||
| thumb-color="black" | ||
| ticks | ||
| /> | ||
| </v-col> | ||
| </v-row> | ||
| <v-row> | ||
| <v-col> | ||
| <ViewerOptionsColoringTypeSelector | ||
| :id="id" | ||
| v-model:coloring_style_key="coloring_style_key" | ||
| v-model:color="color" | ||
| v-model:vertex_attribute="vertex_attribute" | ||
| v-model:edge_attribute="edge_attribute" | ||
| /> | ||
| </v-col> | ||
| </v-row> | ||
| </template> | ||
| </template> | ||
| </ViewerContextMenuItem> | ||
| </template> | ||
|
|
||
| <script setup> | ||
| import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenuItem" | ||
| import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch" | ||
| import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector" | ||
|
|
||
| import { useDataStyleStore } from "@ogw_front/stores/data_style" | ||
| import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer" | ||
|
|
||
| const dataStyleStore = useDataStyleStore() | ||
| const hybridViewerStore = useHybridViewerStore() | ||
|
|
||
| const props = defineProps({ | ||
| itemProps: { type: Object, required: true }, | ||
| btn_image: { type: String, required: true }, | ||
| index: { type: Number, required: true }, | ||
| }) | ||
|
|
||
| const id = toRef(() => props.itemProps.id) | ||
|
|
||
| const visibility = computed({ | ||
| get: () => dataStyleStore.meshEdgesVisibility(id.value), | ||
| set: (newValue) => { | ||
| dataStyleStore.setMeshEdgesVisibility(id.value, newValue) | ||
| hybridViewerStore.remoteRender() | ||
| }, | ||
| }) | ||
| const size = computed({ | ||
| get: () => dataStyleStore.meshEdgesWidth(id.value), | ||
| set: (newValue) => { | ||
| dataStyleStore.setMeshEdgesWidth(id.value, newValue) | ||
| hybridViewerStore.remoteRender() | ||
| }, | ||
| }) | ||
| const coloring_style_key = computed({ | ||
| get: () => dataStyleStore.meshEdgesActiveColoring(id.value), | ||
| set: (newValue) => { | ||
| dataStyleStore.setMeshEdgesActiveColoring(id.value, newValue) | ||
| hybridViewerStore.remoteRender() | ||
| }, | ||
| }) | ||
| const color = computed({ | ||
| get: () => dataStyleStore.meshEdgesColor(id.value), | ||
| set: (newValue) => { | ||
| dataStyleStore.setMeshEdgesColor(id.value, newValue) | ||
| hybridViewerStore.remoteRender() | ||
| }, | ||
| }) | ||
| const vertex_attribute = computed({ | ||
| get: () => dataStyleStore.meshEdgesVertexAttribute(id.value), | ||
| set: (newValue) => { | ||
| dataStyleStore.setMeshEdgesVertexAttribute(id.value, newValue) | ||
| hybridViewerStore.remoteRender() | ||
| }, | ||
| }) | ||
| const edge_attribute = computed({ | ||
| get: () => dataStyleStore.meshEdgesEdgeAttribute(id.value), | ||
| set: (newValue) => { | ||
| dataStyleStore.setMeshEdgesEdgeAttribute(id.value, newValue) | ||
| hybridViewerStore.remoteRender() | ||
| }, | ||
| }) | ||
| </script> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| :itemProps="itemProps" | ||
| tooltip="Edges options" | ||
| :btn_image="SurfaceEdges" | ||
| :index="props.index" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Y a t-il une prop index ? |
||
| > | ||
| <template #options> | ||
| <ViewerOptionsVisibilitySwitch v-model="visibility" /> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| :itemProps="props.itemProps" | ||
| tooltip="Points options" | ||
| :btn_image="SurfacePoints" | ||
| :index="props.index" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pareil ici |
||
| > | ||
| <template #options> | ||
| <ViewerOptionsVisibilitySwitch v-model="visibility" /> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A supprimer du coup non ?