Skip to content

Commit 68bf5e5

Browse files
remove style arg from api functions
1 parent 4aa8552 commit 68bf5e5

File tree

11 files changed

+29
-29
lines changed

11 files changed

+29
-29
lines changed

internal_stores/mesh/edges.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ export function useMeshEdgesStyle() {
8888
)
8989
}
9090

91-
function applyMeshEdgesStyle(id, style) {
91+
function applyMeshEdgesStyle(id) {
92+
const style = meshEdgesStyle(id)
9293
return Promise.all([
9394
setMeshEdgesVisibility(id, style.visibility),
9495
setMeshEdgesActiveColoring(id, style.coloring.active),

internal_stores/mesh/index.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,13 @@ export default function useMeshStyle() {
4444
if (key === "visibility") {
4545
promise_array.push(setMeshVisibility(id, value))
4646
} else if (key === "points") {
47-
promise_array.push(pointsStyleStore.applyMeshPointsStyle(id, value))
47+
promise_array.push(pointsStyleStore.applyMeshPointsStyle(id))
4848
} else if (key === "edges") {
49-
promise_array.push(edgesStyleStore.applyMeshEdgesStyle(id, value))
49+
promise_array.push(edgesStyleStore.applyMeshEdgesStyle(id))
5050
} else if (key === "polygons") {
51-
promise_array.push(
52-
meshPolygonsStyleStore.applyMeshPolygonsStyle(id, value),
53-
)
51+
promise_array.push(meshPolygonsStyleStore.applyMeshPolygonsStyle(id))
5452
} else if (key === "polyhedra") {
55-
promise_array.push(
56-
meshPolyhedraStyleStore.applyMeshPolyhedraStyle(id, value),
57-
)
53+
promise_array.push(meshPolyhedraStyleStore.applyMeshPolyhedraStyle(id))
5854
} else {
5955
throw new Error("Unknown mesh key: " + key)
6056
}

internal_stores/mesh/points.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ export function useMeshPointsStyle() {
108108
)
109109
}
110110

111-
function applyMeshPointsStyle(id, style) {
111+
function applyMeshPointsStyle(id) {
112+
const style = meshPointsStyle(id)
112113
return Promise.all([
113114
setMeshPointsVisibility(id, style.visibility),
114115
setMeshPointsActiveColoring(id, style.coloring.active),

internal_stores/mesh/polygons.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ export function useMeshPolygonsStyle() {
145145
}
146146
}
147147

148-
function applyMeshPolygonsStyle(id, style) {
148+
function applyMeshPolygonsStyle(id) {
149+
const style = meshPolygonsStyle(id)
149150
return Promise.all([
150151
setMeshPolygonsVisibility(id, style.visibility),
151152
setMeshPolygonsActiveColoring(id, style.coloring.active),

internal_stores/mesh/polyhedra.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ export function useMeshPolyhedraStyle() {
135135
// )
136136
// }
137137

138-
function applyMeshPolyhedraStyle(id, style) {
138+
function applyMeshPolyhedraStyle(id) {
139+
const style = meshPolyhedraStyle(id)
139140
return Promise.all([
140141
setMeshPolyhedraVisibility(id, style.visibility),
141142
setMeshPolyhedraActiveColoring(id, style.coloring.active),

internal_stores/model/blocks.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ export function useModelBlocksStyle() {
8080
}
8181

8282
function applyModelBlocksStyle(id) {
83-
const blocks_style = modelBlocksStyle(id)
83+
const style = modelBlocksStyle(id)
8484
const blocks_ids = dataBaseStore.getBlocksUuids(id)
8585
return Promise.all([
86-
setModelBlocksVisibility(id, blocks_ids, blocks_style.visibility),
87-
setModelBlocksColor(id, blocks_ids, blocks_style.color),
86+
setModelBlocksVisibility(id, blocks_ids, style.visibility),
87+
setModelBlocksColor(id, blocks_ids, style.color),
8888
])
8989
}
9090

internal_stores/model/corners.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ export function useModelCornersStyle() {
8080
}
8181

8282
function applyModelCornersStyle(id) {
83-
const corners_style = modelCornersStyle(id)
83+
const style = modelCornersStyle(id)
8484
const corner_ids = dataBaseStore.getCornersUuids(id)
8585
return Promise.all([
86-
setModelCornersVisibility(id, corner_ids, corners_style.visibility),
87-
setModelCornersColor(id, corner_ids, corners_style.color),
86+
setModelCornersVisibility(id, corner_ids, style.visibility),
87+
setModelCornersColor(id, corner_ids, style.color),
8888
])
8989
}
9090

internal_stores/model/edges.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export function useModelEdgesStyle() {
3434
}
3535

3636
function applyModelEdgesStyle(id) {
37-
const edges_style = modelEdgesStyle(id)
38-
return Promise.all([setModelEdgesVisibility(id, edges_style.visibility)])
37+
const style = modelEdgesStyle(id)
38+
return Promise.all([setModelEdgesVisibility(id, style.visibility)])
3939
}
4040

4141
return {

internal_stores/model/lines.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ export function useModelLinesStyle() {
7878
}
7979

8080
function applyModelLinesStyle(id) {
81-
const lines_style = modelLinesStyle(id)
81+
const style = modelLinesStyle(id)
8282
const line_ids = dataBaseStore.getLinesUuids(id)
8383
return Promise.all([
84-
setModelLinesVisibility(id, line_ids, lines_style.visibility),
85-
setModelLinesColor(id, line_ids, lines_style.color),
84+
setModelLinesVisibility(id, line_ids, style.visibility),
85+
setModelLinesColor(id, line_ids, style.color),
8686
])
8787
}
8888

internal_stores/model/points.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ export function useModelPointsStyle() {
5151
}
5252

5353
function applyModelPointsStyle(id) {
54-
const model_points_style = modelPointsStyle(id)
54+
const style = modelPointsStyle(id)
5555
return Promise.all([
56-
setModelPointsVisibility(id, model_points_style.visibility),
57-
setModelPointsSize(id, model_points_style.size),
56+
setModelPointsVisibility(id, style.visibility),
57+
setModelPointsSize(id, style.size),
5858
])
5959
}
6060

0 commit comments

Comments
 (0)