import { For } from 'solid-js'; import type { DeckStore } from '../hooks/deckStore'; export interface LayerEditorPanelProps { store: DeckStore; } const ORIENTATION_OPTIONS = [ { value: 'n', label: '↑ 北' }, { value: 'e', label: '→ 东' }, { value: 's', label: '↓ 南' }, { value: 'w', label: '← 西' } ] as const; /** * 图层编辑面板:图层可见性切换、位置编辑、复制代码 */ export function LayerEditorPanel(props: LayerEditorPanelProps) { const { store } = props; const updateLayerOrientation = (layerProp: string, orientation: 'n' | 's' | 'e' | 'w') => { const layer = store.state.layerConfigs.find(l => l.prop === layerProp); if (layer) { store.actions.updateLayerConfig(layerProp, { ...layer, orientation }); } }; const updateLayerFontSize = (layerProp: string, fontSize?: number) => { const layer = store.state.layerConfigs.find(l => l.prop === layerProp); if (layer) { store.actions.updateLayerConfig(layerProp, { ...layer, fontSize }); } }; return (