fix: plt/print preview window stacking

This commit is contained in:
hyper
2026-03-31 17:28:46 +08:00
parent 246d983ad2
commit 18ea01b904
2 changed files with 23 additions and 17 deletions
+7 -4
View File
@@ -1,4 +1,5 @@
import { createSignal, For, Show, createMemo } from 'solid-js';
import { Portal } from 'solid-js/web';
import { parsePlt, extractCutPaths } from '../../plotcutter/parser';
import { generateTravelPaths, travelPathsToSvg } from '../../plotcutter/layout';
import type { CardPath } from '../../plotcutter/types';
@@ -91,10 +92,11 @@ export function PltPreview(props: PltPreviewProps) {
};
return (
<div class="fixed inset-0 bg-black/50 z-50 overflow-auto">
<div class="min-h-screen py-20 px-4">
{/* 头部控制栏 */}
<div class="fixed top-4 left-1/2 -translate-x-1/2 bg-white shadow-lg rounded-lg px-4 py-3 flex items-center gap-4 z-50">
<Portal>
<div class="fixed inset-0 bg-black/50 z-[60] overflow-auto">
<div class="min-h-screen py-20 px-4">
{/* 头部控制栏 */}
<div class="fixed top-4 left-1/2 -translate-x-1/2 bg-white shadow-lg rounded-lg px-4 py-3 flex items-center gap-4 z-50">
<h2 class="text-base font-bold m-0">PLT </h2>
<div class="flex items-center gap-2 flex-1">
<Show when={parsedData().width > 0}>
@@ -224,5 +226,6 @@ export function PltPreview(props: PltPreviewProps) {
</div>
</div>
</div>
</Portal>
);
}