X-Git-Url: https://git.r.bdr.sh/rbdr/canvas/blobdiff_plain/e4e4b5202bf0039127f591941fddc1ff5ca09897..HEAD:/src/lib/components/sensor.svelte?ds=sidebyside

diff --git a/src/lib/components/sensor.svelte b/src/lib/components/sensor.svelte
index b6d38d8..9458705 100644
--- a/src/lib/components/sensor.svelte
+++ b/src/lib/components/sensor.svelte
@@ -1,34 +1,33 @@
 <script>
-  import { browser } from '$app/environment';
-  import { maxSize } from '$lib/config';
-  import { modulo } from '$lib/math';
-  import { canvas } from '$lib/stores/canvas';
-  import { sensor } from '$lib/stores/widgets';
+	import { browser } from '$app/environment';
+	import { maxSize } from '$lib/config';
+	import { modulo } from '$lib/math';
+	import { canvas } from '$lib/stores/canvas';
+	import { sensor } from '$lib/stores/widgets';
 
-  const kSensorSize = 2;
+	const kSensorSize = 2;
 
-  let left;
-  let right;
-  let top;
-  let bottom;
+	let left;
+	let right;
+	let top;
+	let bottom;
 
-  let timer;
-  const fetchItems = function fetchItems( left, top, right, bottom ) {
-    clearTimeout(timer);
+	let timer;
+	const fetchItems = function fetchItems(left, top, right, bottom) {
+		clearTimeout(timer);
 		timer = setTimeout(() => {
-      sensor.set({ left, top, right, bottom });
+			sensor.set({ left, top, right, bottom });
 		}, 50);
-  }
+	};
 
-  $: {
-    if (browser) {
-      left = modulo($canvas.x - window.screen.width * kSensorSize, maxSize);
-      top = modulo($canvas.y - window.screen.height * kSensorSize, maxSize);
-      right = left + 2 * window.screen.width * kSensorSize;
-      bottom = top + 2 * window.screen.height * kSensorSize;
-
-      fetchItems(left, top, right, bottom);
-    }
-  }
+	$: {
+		if (browser) {
+			left = modulo($canvas.x - window.screen.width * kSensorSize, maxSize);
+			top = modulo($canvas.y - window.screen.height * kSensorSize, maxSize);
+			right = left + 2 * window.screen.width * kSensorSize;
+			bottom = top + 2 * window.screen.height * kSensorSize;
 
+			fetchItems(left, top, right, bottom);
+		}
+	}
 </script>
