The Export panel, SDK helpers, app menus, and CLI each kept their own hand-written format lists, so new formats such as PPTX reached some surfaces and not others. Scene Graph now owns the persisted export-setting format ids, Core IO adapters carry literal ids so that list is checked against real adapters, and the panel labels, scale handling, app format types, and CLI format validation/help are derived from the registry. PPTX joins the Export panel as a result.
797 B
797 B
| title | description |
|---|---|
| useExport | Scale und Format für den Export der aktuellen Selection verwalten. |
useExport
useExport() stellt State und Actions für ein Export-Panel bereit:
- Export settings;
- IDs der ausgewählten Objekte;
- Name der Output file;
- verfügbare Scales und Formats.
Verwendung
import { useExport } from '@open-pencil/vue'
const exportState = useExport()
Beispiel
const {
settings,
nodeName,
scales,
formats,
addSetting,
updateScale,
updateFormat,
} = useExport()
Weiteres Export setting
exportState.addSetting()
WEBP mit Scale 2×
exportState.updateScale(0, 2)
exportState.updateFormat(0, 'webp')