fix: loosen glass dashboard workspace
This commit is contained in:
@@ -21,7 +21,8 @@ function nextPreviewState(event: PointerEvent<HTMLElement>, aspectRatio?: string
|
||||
const gap = 18;
|
||||
const margin = 12;
|
||||
const ratio = parseRatio(aspectRatio);
|
||||
const width = Math.min(620, Math.max(280, window.innerWidth * 0.42));
|
||||
const maxWidth = ratio < 0.8 ? 380 : ratio > 1.35 ? 620 : 500;
|
||||
const width = Math.min(maxWidth, Math.max(260, window.innerWidth * 0.38));
|
||||
const height = Math.min(window.innerHeight * 0.82, width / ratio);
|
||||
let left = event.clientX + gap;
|
||||
let top = event.clientY + gap;
|
||||
@@ -69,7 +70,7 @@ export function HoverImagePreview({
|
||||
/>
|
||||
{preview && (
|
||||
<div
|
||||
className="pointer-events-none fixed z-[90] rounded-[8px] bg-white p-2 shadow-2xl ring-1 ring-white/20"
|
||||
className="pointer-events-none fixed z-[90] rounded-[8px] bg-white p-2 shadow-[0_24px_80px_-24px_rgba(0,0,0,0.86)] ring-1 ring-white/20"
|
||||
style={{ left: preview.left, top: preview.top, width: preview.width }}
|
||||
>
|
||||
<img src={src} alt="" className="max-h-[82vh] w-full object-contain" style={{ aspectRatio: parseRatio(aspectRatio) }} />
|
||||
|
||||
Reference in New Issue
Block a user