feat: make windows stackable properly
All checks were successful
create archive with lfs / tag (push) Successful in 8s
All checks were successful
create archive with lfs / tag (push) Successful in 8s
This commit is contained in:
parent
7dc0c68d7f
commit
596ec2ff44
@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { highestZIndex } from '$lib/window.ts';
|
||||
import { draggable } from '@neodrag/svelte';
|
||||
|
||||
export let title: string | undefined = undefined;
|
||||
@ -24,9 +25,16 @@
|
||||
</script>
|
||||
|
||||
<div
|
||||
use:draggable={{applyUserSelectHack: true, handle: '.window-titlebar'}}
|
||||
use:draggable={{
|
||||
applyUserSelectHack: true,
|
||||
handle: '.window-titlebar',
|
||||
onDragStart: (data) => {
|
||||
$highestZIndex += 1
|
||||
data.currentNode.style.zIndex = $highestZIndex.toString()
|
||||
}
|
||||
}}
|
||||
class="
|
||||
flex flex-col {sticky ? 'md:sticky md:-top-9' : ''} {center ? "mx-auto" : ""}
|
||||
relative flex flex-col {sticky ? 'md:sticky md:-top-9' : ''} {center ? "mx-auto" : ""}
|
||||
max-w-screen-md xl:max-w-screen-lg 2xl:max-w-screen-xl min-w-[30ch] lg:min-w-[40ch] w-full md:w-fit [height:fit-content]
|
||||
bg-ralsei-black border-ralsei-white border-ridge border-8 border-t-[12px]
|
||||
animate-{chosenKeyframe}
|
||||
|
3
src/lib/window.ts
Normal file
3
src/lib/window.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import { writable } from "svelte/store";
|
||||
|
||||
export const highestZIndex = writable(0)
|
Loading…
Reference in New Issue
Block a user