mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: 8 image editor bugs found during Docker-based E2E testing
- fix WebP export silently producing PNG when background is non-transparent - fix autosave not converting blob: URLs inside image-type canvas objects - fix project load not resetting selection/crop/clipboard state - fix rotateCanvas not updating object rotation attributes - fix flipCanvas not negating object rotation attributes - fix line shadow props overridden by effect spread ordering - fix "outside" stroke position rendering same as "center" - add missing pencil tool keyboard shortcut (N) - remove misleading resample dropdown from image resize dialog - fix E2E autosave tests for production builds (no Vite dynamic imports) - fix color picker test case sensitivity (CSS uppercase vs DOM text) - add 4 unit tests for rotation attribute transforms
This commit is contained in:
@@ -433,6 +433,9 @@ export const useEditorStore = create<EditorState & EditorStateExtensions>()(
|
||||
a.radiusY = oldRx;
|
||||
}
|
||||
}
|
||||
if ("rotation" in attrs) {
|
||||
a.rotation = ((a.rotation || 0) + degrees) % 360;
|
||||
}
|
||||
return { ...obj, attrs } as CanvasObject;
|
||||
}),
|
||||
isDirty: true,
|
||||
@@ -458,6 +461,9 @@ export const useEditorStore = create<EditorState & EditorStateExtensions>()(
|
||||
const w = centerBased ? 0 : "width" in attrs ? a.width : 0;
|
||||
a.x = canvasSize.width - a.x - w;
|
||||
}
|
||||
if ("rotation" in attrs) {
|
||||
a.rotation = (360 - (a.rotation || 0)) % 360;
|
||||
}
|
||||
return { ...obj, attrs } as CanvasObject;
|
||||
}),
|
||||
isDirty: true,
|
||||
@@ -483,6 +489,9 @@ export const useEditorStore = create<EditorState & EditorStateExtensions>()(
|
||||
const h = centerBased ? 0 : "height" in attrs ? a.height : 0;
|
||||
a.y = canvasSize.height - a.y - h;
|
||||
}
|
||||
if ("rotation" in attrs) {
|
||||
a.rotation = (360 - (a.rotation || 0)) % 360;
|
||||
}
|
||||
return { ...obj, attrs } as CanvasObject;
|
||||
}),
|
||||
isDirty: true,
|
||||
|
||||
Reference in New Issue
Block a user