Compare commits

...

2 commits

Author SHA1 Message Date
fed3c8882a feat: fullscreen on double click
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2024-02-03 18:14:58 +01:00
fe557faa81 dev: add intellij run configuration 2024-02-03 18:13:42 +01:00
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="dev" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="dev" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
</component>

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