pull/3282/head
Steve Ruiz 2024-05-03 16:30:36 +01:00
rodzic c166f7f026
commit 07f505ceab
3 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -17,7 +17,7 @@ export default function PopupShapeExample() {
y: Math.floor(i / 3) * 220,
})
}
editor.zoomToContent({ duration: 0 })
editor.zoomToBounds(editor.getCurrentPageBounds()!, { animation: { duration: 0 } })
}}
/>
</div>

Wyświetl plik

@ -24,10 +24,12 @@ it('zooms by increments', () => {
})
it('is ignored by undo/redo', () => {
const cameraOptions = editor.getCameraOptions()
editor.mark()
editor.zoomIn()
editor.undo()
expect(editor.getZoomLevel()).toBe(ZOOMS[4])
expect(editor.getZoomLevel()).toBe(cameraOptions.zoomSteps[4])
})
it('preserves the screen center', () => {

Wyświetl plik

@ -23,10 +23,12 @@ it('zooms out and in by increments', () => {
})
it('is ignored by undo/redo', () => {
const cameraOptions = editor.getCameraOptions()
editor.mark()
editor.zoomOut()
editor.undo()
expect(editor.getZoomLevel()).toBe(ZOOMS[2])
expect(editor.getZoomLevel()).toBe(cameraOptions.zoomSteps[2])
})
it('does not zoom out when camera is frozen', () => {