feat: split gridSize from enabled state & support custom gridStep (#8364)

This commit is contained in:
David Luzar
2024-08-14 14:59:14 +02:00
committed by GitHub
parent 4320a3cf41
commit 3cfcc7b489
31 changed files with 737 additions and 278 deletions

View File

@@ -105,6 +105,8 @@ export const actionClearCanvas = register({
exportBackground: appState.exportBackground,
exportEmbedScene: appState.exportEmbedScene,
gridSize: appState.gridSize,
gridStep: appState.gridStep,
gridModeEnabled: appState.gridModeEnabled,
stats: appState.stats,
pasteDialog: appState.pasteDialog,
activeTool:
@@ -294,7 +296,6 @@ export const zoomToFitBounds = ({
appState.height / commonBoundsHeight,
) * clamp(viewportZoomFactor, 0.1, 1);
// Apply clamping to newZoomValue to be between 10% and 3000%
newZoomValue = getNormalizedZoom(newZoomValue);
let appStateWidth = appState.width;