Skip to content

Commit cb6af57

Browse files
author
Tristan LOSADA BENINI
committed
fix(astrapia): fix layout enabling
endpoint call on filterMenu open NETANOL-213
1 parent 8d776dd commit cb6af57

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Astrapia/components/Graph.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,14 @@ export default {
231231
if (!selectedNode) {
232232
this.node.transition()
233233
.duration(150)
234-
.attr("fill", "#537B87")
234+
.attr("fill", d => d.hexColor ?? "#537B87")
235235
.attr("r", 8)
236236
.attr("opacity", 1);
237237
238238
this.link.transition()
239239
.duration(150)
240-
.attr("stroke", d => colorScale(d.byteCount))
241-
.attr("stroke-width", d => packetCountScale(d.packetCount))
240+
.attr("stroke-width", d => d.width ?? packetCountScale(d.packetCount))
241+
.attr("stroke", d => d.hexColor ?? colorScale(d.byteCount))
242242
.attr("opacity", 1);
243243
244244
this.label.transition()

Astrapia/components/GraphFilterMenu.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ watch(() => props.layout!, (newLayout, oldLayout) => {
4747
graphFilterMenuState.value.selectedLayout.name = newLayout;
4848
});
4949
50-
const toggleMenu = () => {
50+
const toggleMenu = async () => {
5151
graphFilterMenuState.value.isExpanded = !graphFilterMenuState.value.isExpanded;
52+
await getLayersOfLayout();
5253
emit('menuOpened', graphFilterMenuState.value.isExpanded)
5354
}
5455

Astrapia/components/LayerManagement.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,9 @@ function openCloseLayer(index: number) {
180180
}
181181
182182
function setLayerEnabled(index: number, value: boolean) {
183-
const layer = layerListState.value.selectedLayout.layers[index];
184-
layer.enabled = value;
185-
Object.assign(createLayerData.value, layer);
183+
getExistingLayer(index);
186184
setTimeout(() => {
185+
createLayerData.value.enabled = value;
187186
editExistingLayer(index);
188187
Object.assign(createLayerData.value, {
189188
name: '',

0 commit comments

Comments
 (0)