allows scrolling backwards through history

This commit is contained in:
2025-01-05 10:52:09 -05:00
parent 32fcbbd916
commit 2cb1eec404
11 changed files with 214 additions and 87 deletions

View File

@@ -3,6 +3,7 @@ import { computed, inject, provide, ref, toValue, watch } from 'vue';
import { AXIS_DATA, type AxisData, AxisType } from '@/graph/axis';
import { GRAPH_DATA, type GraphData, GraphSide } from '@/graph/graph';
import NumericText from '@/components/NumericText.vue';
import { useNow } from '@/composables/ticker';
const props = defineProps<{
y_limits?: [number, number];
@@ -28,7 +29,9 @@ const raw_max_y = ref(-Infinity);
const axis_update_watch = ref(0);
watch([graph_data.min_x, graph_data.max_x], () => {
const axis_update_ticker = useNow(50);
watch([graph_data.min_x, graph_data.max_x, axis_update_ticker], () => {
axis_update_watch.value++;
min_y.value = raw_min_y.value;
max_y.value = raw_max_y.value;