You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I take the points from one controller and initialize another with those points, toImage will work as expected, but toRawSvg will connect individual strokes together, exactly like #87.
This is due to the fact that toRawSvg is using _latestActions to determine strokes, as opposed to the PointType of each point, which is how strokes are distinguished everywhere else.
I would venture a guess that toRawSvg should split points into strokes based on PointType (same as the other methods of drawing) rather than piggybacking on _latestActions, which is only used to support undo/redo functionality. If I'm initializing a controller with points, I would not necessarily expect undo/redo functionality to be supported, but I would definitely expect toRawSvg to distinguish between separate strokes.
Workaround
We are storing signatures as strokes on our side, so our workaround was to loop through the strokes, setting points and calling pushCurrentStateToUndoStack for each stroke. This will populate _latestActions with a list of strokes as toRawSvg expects.
The text was updated successfully, but these errors were encountered:
If I take the points from one controller and initialize another with those points,
toImage
will work as expected, buttoRawSvg
will connect individual strokes together, exactly like #87.This is due to the fact that
toRawSvg
is using_latestActions
to determine strokes, as opposed to thePointType
of each point, which is how strokes are distinguished everywhere else.I would venture a guess that
toRawSvg
should split points into strokes based onPointType
(same as the other methods of drawing) rather than piggybacking on_latestActions
, which is only used to support undo/redo functionality. If I'm initializing a controller with points, I would not necessarily expect undo/redo functionality to be supported, but I would definitely expecttoRawSvg
to distinguish between separate strokes.Workaround
We are storing signatures as strokes on our side, so our workaround was to loop through the strokes, setting points and calling
pushCurrentStateToUndoStack
for each stroke. This will populate_latestActions
with a list of strokes astoRawSvg
expects.The text was updated successfully, but these errors were encountered: