File tree Expand file tree Collapse file tree
packages/products/src/shared/ui/general/dev Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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 >
You can’t perform that action at this time.
0 commit comments