Skip to content

Commit 7fca783

Browse files
authored
Merge pull request #535 from Yonava/te/update-debug-mode-text-color
[product] fix dev mode debug text color contrast
2 parents 31246ea + abde321 commit 7fca783

2 files changed

Lines changed: 23 additions & 20 deletions

File tree

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<script setup lang="ts">
2-
import { useFPS } from "@magic/utils/fps";
2+
import { useFPS } from "@magic/utils/fps";
3+
import GText from "../../graph-core/GText.vue";
34
4-
const { fps, slowFrameCount, slowFrameRatio } = useFPS();
5+
const { fps, slowFrameCount, slowFrameRatio } = useFPS();
56
</script>
67

78
<template>
8-
<div class="text-white text-end">
9+
<GText class="text-end">
910
<div>FPS: {{ fps }}</div>
1011
<div>Slow Frame Count: {{ slowFrameCount }}</div>
1112
<div>Slow Frame Ratio: {{ slowFrameRatio.toFixed(2) }}</div>
12-
</div>
13+
</GText>
1314
</template>
Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
<script setup lang="ts">
2-
import { nonNullGraph as graph } from "../../../../shared/globalGraph";
2+
import { nonNullGraph as graph } from "../../../../shared/globalGraph";
33
4-
import { computed } from "vue";
54
6-
const coords = computed(() => {
7-
const {
8-
coords: { x, y },
9-
} = graph.value.graphAtMousePosition.value;
10-
return { x: Math.round(x), y: Math.round(y) };
11-
});
5+
import { computed } from "vue";
6+
import GText from "../../graph-core/GText.vue";
127
13-
const hoveredItems = computed(() => {
14-
const { items } = graph.value.graphAtMousePosition.value;
15-
return items.map(
16-
(item) => `${item.graphType} - ${item.shape.name} (${item.id})`
17-
);
18-
});
8+
const coords = computed(() => {
9+
const {
10+
coords: { x, y },
11+
} = graph.value.graphAtMousePosition.value;
12+
return { x: Math.round(x), y: Math.round(y) };
13+
});
14+
15+
const hoveredItems = computed(() => {
16+
const { items } = graph.value.graphAtMousePosition.value;
17+
return items.map(
18+
(item) => `${item.graphType} - ${item.shape.name} (${item.id})`
19+
);
20+
});
1921
</script>
2022

2123
<template>
22-
<div class="text-white text-end">
24+
<GText class="text-end">
2325
<div>Cursor At: (X = {{ coords.x }}, Y = {{ coords.y }})</div>
2426
<div>Items Hovered: {{ hoveredItems }}</div>
25-
</div>
27+
</GText>
2628
</template>

0 commit comments

Comments
 (0)