applies formatting and linting
This commit is contained in:
@@ -64,10 +64,18 @@ time_lines.reverse();
|
||||
const text_offset = computed(() => 5);
|
||||
|
||||
const legend_width = 160;
|
||||
const border_left = computed(() => (props.left_axis ? 96 : 0) + (props.legend == GraphSide.Left ? legend_width : 0));
|
||||
const border_right = computed(() => (props.right_axis ? 80 : 0) + (props.legend == GraphSide.Right ? legend_width : 0));
|
||||
const border_left = computed(
|
||||
() =>
|
||||
(props.left_axis ? 96 : 0) +
|
||||
(props.legend == GraphSide.Left ? legend_width : 0),
|
||||
);
|
||||
const border_right = computed(
|
||||
() =>
|
||||
(props.right_axis ? 80 : 0) +
|
||||
(props.legend == GraphSide.Right ? legend_width : 0),
|
||||
);
|
||||
const border_top = computed(() => 6);
|
||||
const border_bottom = computed(() => props.hide_time_labels ? 6 : 24);
|
||||
const border_bottom = computed(() => (props.hide_time_labels ? 6 : 24));
|
||||
|
||||
const max_x = now;
|
||||
const min_x = computed(() => max_x.value - window_duration.value);
|
||||
@@ -75,7 +83,8 @@ const min_x = computed(() => max_x.value - window_duration.value);
|
||||
const x_map = (x: number) => {
|
||||
const diff_x = max_x.value - min_x.value;
|
||||
return (
|
||||
((width.value - border_left.value - border_right.value) * (x - min_x.value)) /
|
||||
((width.value - border_left.value - border_right.value) *
|
||||
(x - min_x.value)) /
|
||||
diff_x +
|
||||
border_left.value
|
||||
);
|
||||
@@ -83,8 +92,12 @@ const x_map = (x: number) => {
|
||||
|
||||
const telemetry_lines = ref([]);
|
||||
|
||||
const legend_enabled = computed(() => props.legend === GraphSide.Left || props.legend === GraphSide.Right);
|
||||
const legend_x = computed(() => (props.legend === GraphSide.Left) ? (8) : (width.value - legend_width + 8));
|
||||
const legend_enabled = computed(
|
||||
() => props.legend === GraphSide.Left || props.legend === GraphSide.Right,
|
||||
);
|
||||
const legend_x = computed(() =>
|
||||
props.legend === GraphSide.Left ? 8 : width.value - legend_width + 8,
|
||||
);
|
||||
const legend_y = computed(() => border_top.value);
|
||||
const legend_x_stride = computed(() => 0);
|
||||
const legend_y_stride = computed(() => 16);
|
||||
@@ -188,5 +201,4 @@ const lines = computed(() => {
|
||||
stroke: variables.$time-tick;
|
||||
fill: variables.$time-tick;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user