]> git.r.bdr.sh - rbdr/canvas/blobdiff - src/lib/components/hud.svelte
Save WIP
[rbdr/canvas] / src / lib / components / hud.svelte
index ffea4ded08e86be6db7bd99000f16026dc0c3e14..a115c9184f1a466fba039e6a421bca0edd82c7b9 100644 (file)
@@ -1,29 +1,26 @@
 <script>
-  import { coordinateLength } from '$lib/config';
-  import { canvas } from '$lib/stores/canvas';
+       import { coordinateLength } from '$lib/config';
+       import { canvas } from '$lib/stores/canvas';
 
-  const kSeparatorRegex = /([0-9a-z]{2})/g;
+       const kSeparatorRegex = /([0-9a-z]{2})/g;
 
-  const formatCoordinate = function formatCoordinate(coordinate) {
-    return coordinate
-      .toString(16)
-      .padStart(coordinateLength, 0)
-      .replace(kSeparatorRegex, '$1 ');
-  }
+       const formatCoordinate = function formatCoordinate(coordinate) {
+               return coordinate.toString(16).padStart(coordinateLength, 0).replace(kSeparatorRegex, '$1 ');
+       };
 </script>
 
 <div class="hud">
-  { formatCoordinate($canvas.x) } × { formatCoordinate($canvas.y) }
+       {formatCoordinate($canvas.x)} × {formatCoordinate($canvas.y)}
 </div>
 
 <style>
-  .hud {
-    background-color: #fff;
-    padding: 4px;
-    position: fixed;
-    bottom: 2px;
-    right: 2px;
-    font-smooth: never;
-    -webkit-font-smoothing : none;
-  }
+       .hud {
+               background-color: #fff;
+               padding: 4px;
+               position: fixed;
+               bottom: 2px;
+               right: 2px;
+               font-smooth: never;
+               -webkit-font-smoothing: none;
+       }
 </style>