]> git.r.bdr.sh - rbdr/canvas/blobdiff - src/lib/components/hud.svelte
Update project, improve sensor/render logic
[rbdr/canvas] / src / lib / components / hud.svelte
index f79658a46a695249e1a638ebc6ac6fa9022d21f2..ffea4ded08e86be6db7bd99000f16026dc0c3e14 100644 (file)
@@ -1,8 +1,6 @@
 <script>
   import { coordinateLength } from '$lib/config';
-
-  export let x;
-  export let y;
+  import { canvas } from '$lib/stores/canvas';
 
   const kSeparatorRegex = /([0-9a-z]{2})/g;
 
@@ -15,7 +13,7 @@
 </script>
 
 <div class="hud">
-  { formatCoordinate(x) } × { formatCoordinate(y) }
+  { formatCoordinate($canvas.x) } × { formatCoordinate($canvas.y) }
 </div>
 
 <style>