Skip to content

Commit

Permalink
style(Labels): Improve point data and cell data labels
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Sep 3, 2019
1 parent 8ece62c commit db50d2a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ViewerStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ class GeometriesUIStore {
.getPointData()
.getArrays()
.map((a) => ({
label: `(p) ${a.getName()}`,
label: `Points: ${a.getName()}`,
value: `pointData:${a.getName()}`,
})),
geometry
.getCellData()
.getArrays()
.map((a) => ({
label: `(c) ${a.getName()}`,
label: `Cells: ${a.getName()}`,
value: `cellData:${a.getName()}`,
}))
)
Expand All @@ -108,13 +108,13 @@ class GeometriesUIStore {
if (!!pointData.getScalars()) {
const activeIndex = pointData.getActiveScalars();
const activeArray = pointData.getArrays()[activeIndex];
return { label: `(p) ${activeArray.getName()}`, value: `pointData:${activeArray.getName()}` };
return { label: `Points: ${activeArray.getName()}`, value: `pointData:${activeArray.getName()}` };
}
const cellData = geometry.getCellData();
if (!!cellData.getScalars()) {
const activeIndex = cellData.getActiveScalars();
const activeArray = cellData.getArrays()[activeIndex];
return { label: `(c) ${activeArray.getName()}`, value: `cellData:${activeArray.getName()}` };
return { label: `Cells: ${activeArray.getName()}`, value: `cellData:${activeArray.getName()}` };
}
throw new Error('Should not reach here.')
})
Expand Down Expand Up @@ -153,7 +153,7 @@ class PointSetsUIStore {
.getPointData()
.getArrays()
.map((a) => ({
label: `(p) ${a.getName()}`,
label: `${a.getName()}`,
value: `pointData:${a.getName()}`,
})),
)
Expand All @@ -169,7 +169,7 @@ class PointSetsUIStore {
if (!!pointData.getScalars()) {
const activeIndex = pointData.getActiveScalars();
const activeArray = pointData.getArrays()[activeIndex];
return { label: `(p) ${activeArray.getName()}`, value: `pointData:${activeArray.getName()}` };
return { label: `${activeArray.getName()}`, value: `pointData:${activeArray.getName()}` };
}
throw new Error('Should not reach here.')
})
Expand Down

0 comments on commit db50d2a

Please sign in to comment.