Skip to content

Release 1.2.0 - #213

Draft
tbolis wants to merge 7 commits into
mainfrom
release/1.2.0
Draft

tbolis wants to merge 7 commits into
mainfrom
release/1.2.0

Conversation

@tbolis

@tbolis tbolis commented Nov 6, 2026

Copy link
Copy Markdown
Owner

No description provided.

tbolis and others added 7 commits November 6, 2026 12:28
The showcase depends on react-sketch ^1.2.0. The eraser and laser pointer
packages keep their versions, as they did not change.
Undo set all the properties of the saved state of an object. A line has its
points relative to its center, and the canvas takes them for the ones of the
canvas when they are set, so a line went to the top left corner. Undo and
redo now set the properties which the modification changed, and no others.

A modification of a selection of many objects was not recorded, so undo
removed the last object drawn. It is one action for all the objects now.

The state an object goes back to is the one it has when the pointer is
pressed on it. The snapshot of a rectangle with a label was the one of the
press which drew it (the size of 0), as only the last object added was
refreshed on release, so undo made the rectangle disappear, and its text
box, which follows it, was left behind. The text box is recorded with it.
…he size of the canvas

toDataURL({ multiplier: "original" }) draws the drawing with one pixel of the
picture for each pixel of the background image, at any size of the canvas, so a
drawing on a photo does not lose the resolution of the photo. getOriginalSize()
returns the size of that image, and the showcase has an Original size button
which gives the canvas that size, and downloads at that resolution.

The factors which scale the drawing when the canvas is resized were rounded to
two decimals, so the drawing was a little off its size, the error added up with
every resize, and a canvas could not go back to the size it had. They are exact
now.
Remove the comment above the resize factors, and replace the HTML table of the
options in the documentation of toDataURL with a reference to DataUrlOptions,
which describes each of them.
fix: undo and redo of a move put the objects back where they were
feat: export at the resolution of the background image, and restore the size of the canvas

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant