feat: fullscreen on double click
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
fe557faa81
commit
fed3c8882a
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue