Skip to content

Commit

Permalink
Reference investigative issue #176
Browse files Browse the repository at this point in the history
  • Loading branch information
pihart authored and cjquines committed Jun 10, 2021
1 parent 837b74f commit 3bc67d3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/lib/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ export default class Page extends fabric.Canvas {
);
}
return objects.map((obj) =>
// This is needed for selection groups to be serialized properly
// This is needed for selection groups to be serialized properly.
// If directly using `obj.toObject` it somehow depends on the selection remaining active,
// as claimed in https://github.com/fabricjs/fabric.js/blob/2eabc92a3221dd628576b1bb029a5dc1156bdc06/src/canvas.class.js#L1262-L1272
// as claimed in <https://github.com/fabricjs/fabric.js/blob/2eabc92a3221dd628576b1bb029a5dc1156bdc06/src/canvas.class.js#L1262-L1272>.
//
// We tried using that method in b9cb04c3dacd951785ce4e94ce0c629c09319ec3 but this caused issue #171
// See https://github.com/cjquines/qboard/issues/171 for more details
// We tried using that method in b9cb04c3dacd951785ce4e94ce0c629c09319ec3 but this caused issue #171.
// See https://github.com/cjquines/qboard/issues/171
// and https://github.com/cjquines/qboard/issues/176
// for more details.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(this as any)._toObject(obj, "toObject", ["strokeUniform"])
);
Expand Down

0 comments on commit 3bc67d3

Please sign in to comment.