mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
Fix selected shapes shifting to canvas origin
This commit is contained in:
parent
6c2205663e
commit
d81b96fed0
1 changed files with 4 additions and 0 deletions
|
@ -36,6 +36,10 @@ export function exportShapesToClozeDeletions(occludeInactive: boolean): {
|
|||
*/
|
||||
function baseShapesFromFabric(occludeInactive: boolean): ShapeOrShapes[] {
|
||||
const canvas = globalThis.canvas as Canvas;
|
||||
|
||||
// Prevents multiple shapes in 'activeSelection' from shifting to the canvas origin
|
||||
canvas.discardActiveObject();
|
||||
|
||||
makeMaskTransparent(canvas, false);
|
||||
const objects = canvas.getObjects() as FabricObject[];
|
||||
return objects
|
||||
|
|
Loading…
Reference in a new issue