feat: fullscreen on double click
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Tomáš Mládek 2024-02-03 18:14:58 +01:00
parent fe557faa81
commit fed3c8882a

View file

@ -4,6 +4,7 @@
import Axes from '$lib/Axes.svelte';
import ColorGradient from '$lib/ColorGradient.svelte';
import BrightnessGradient from '$lib/BrightnessGradient.svelte';
import { onMount } from 'svelte';
let sizes = {
blockSize: 64,
@ -19,6 +20,12 @@
$: circleBlocks =
2 * Math.floor((Math.min(sizes.horizontalCount, sizes.verticalCount) * 0.66) / 2) +
(sizes.horizontalCount % 2);
onMount(() => {
window.addEventListener('dblclick', () => {
document.body.requestFullscreen();
})
});
</script>
<div