allows scrolling backwards through history
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user