desktop.focus(id)}
use:draggable={{ handle: '.title-bar', enabled: !isMobile && !isMaximized }}
ondragmove={(e) => {
left = e.detail.x;
top = e.detail.y;
}}
use:resizable={{
enabled: resizableWindow && !isMobile && !isMaximized,
minWidth,
minHeight,
maxWidth: typeof window !== 'undefined' ? window.innerWidth - 16 : 1600,
maxHeight: typeof window !== 'undefined' ? window.innerHeight - 40 : 1200
}}
onresizemove={(e) => {
w = Math.max(minWidth, e.detail.width);
h = Math.max(minHeight, e.detail.height);
}}
>
showMaximize && toggleMaximize()} role="presentation">
{win.title}
{#if showMaximize && !isMobile}
{/if}
{#if menu}
{/if}
{@render children()}
{/if}