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.
800 B
800 B
| title | description |
|---|---|
| useExport | Ustawienia scale i format eksportu bieżącego selection. |
useExport
useExport() udostępnia state i actions panelu eksportu zaznaczonych obiektów:
- ustawienia eksportu;
- IDs zaznaczonych obiektów;
- nazwę pliku wynikowego;
- dostępne scales i formats.
Użycie
import { useExport } from '@open-pencil/vue'
const exportState = useExport()
Przykład
const {
settings,
nodeName,
scales,
formats,
addSetting,
updateScale,
updateFormat,
} = useExport()
Dodatkowy wariant eksportu
exportState.addSetting()
WEBP w skali 2×
exportState.updateScale(0, 2)
exportState.updateFormat(0, 'webp')