Skip to content

Commit

Permalink
Fix infinite update with timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
rien committed Jun 29, 2023
1 parent 8a73c2b commit 899d0a0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
7 changes: 1 addition & 6 deletions web/src/components/clustering/ClusterTimeSeries.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="timeseries" ref="timeseriesElement">
<graph-legend :legend.sync="legend" />
<graph-legend :legend="legend" readonly />
</div>
</template>

Expand Down Expand Up @@ -226,11 +226,6 @@ watch(
}
);
// Update the internal legend object when the legend changes.
watch(legend, (l) => {
legend.value = l;
});
// Watch width changes & update the size.
watch(width, () => {
draw();
Expand Down
4 changes: 3 additions & 1 deletion web/src/components/graph/GraphLegend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
>
<label>
<input
:disabled="readonly"
type="checkbox"
v-model="legendDatum.selected"
class="legend-checkbox"
Expand All @@ -31,9 +32,10 @@ import { useVModel } from "@vueuse/core";
interface Props {
legend: Legend;
readonly?: boolean;
}
const props = withDefaults(defineProps<Props>(), {});
const props = withDefaults(defineProps<Props>(), { readonly: false });
const emit = defineEmits(["update:legend"]);
const legendValue = useVModel(props, "legend", emit);
Expand Down
4 changes: 2 additions & 2 deletions web/src/views/analysis/cluster.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
node-clickable
@click:node="onNodeClick"
>
<graph-legend :legend.sync="legend" />
<graph-legend :legend="legend" readonly />
</graph>
</v-card-text>
</v-card>
Expand Down Expand Up @@ -175,4 +175,4 @@ const showHeatmap = computed(() => {
height: 350px;
}
}
</style>
</style>
2 changes: 1 addition & 1 deletion web/src/views/analysis/submission.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
node-clickable
@click:node="onNodeClick"
>
<graph-legend :legend.sync="legend" />
<graph-legend :legend="legend" readonly />
</graph>
</div>
</v-card-text>
Expand Down

0 comments on commit 899d0a0

Please sign in to comment.