<script>
import { browser } from '$app/env';
-
- export let x;
- export let y;
+ import { canvas } from '$lib/stores/canvas';
const kDotSize = 32;
$: {
if (browser) {
document.documentElement.style.setProperty('--dot-size', kDotSize + 'px');
- document.documentElement.style.setProperty('--dot-x', kDotSize - x % kDotSize + 'px');
- document.documentElement.style.setProperty('--dot-y', kDotSize - y % kDotSize + 'px');
+ document.documentElement.style.setProperty('--dot-x', kDotSize - $canvas.x % kDotSize + 'px');
+ document.documentElement.style.setProperty('--dot-y', kDotSize - $canvas.y % kDotSize + 'px');
}
}
</script>