2 import { browser } from '$app/env';
3 import { maxSize } from '$lib/config';
4 import { canvas } from '$lib/stores/canvas';
5 import { sensor } from '$lib/stores/widgets';
15 const fetchItems = function fetchItems( left, top, right, bottom ) {
17 timer = setTimeout(() => {
18 sensor.set({ left, top, right, bottom });
24 left = $canvas.x - window.screen.width * kSensorSize;
25 top = $canvas.y - window.screen.height * kSensorSize;
26 right = $canvas.x + window.screen.width * kSensorSize;
27 bottom = $canvas.y + window.screen.height * kSensorSize;
29 fetchItems(left, top, right, bottom);