anki/ts/image-occlusion/shapes
Hikaru Y b3f6edc323
Fix polygon tool not working (#2712)
* Fix polygon not converting correctly to cloze

* Fix first polygon disappearing when creating se...

...cond one during editing

Previously, a fabric object was passed directly to a `Shape` such as
`Rectangle` or `Polygon`, so mutating a non-primitive property of the
shape would lead to mutating the original fabric object as well.

* Commit addition of polygon immediately

Unlike the rect or ellipse tools, when the polygon tool was active,
clicking on the canvas did not fire the `object:removed` event and the
`change` event was not dispatched. As a result, an addition of a polygon
was not saved to the DB when switching to another note or closing the
editor in edit mode without performing an action that dispatched the
`change` event.
2023-10-10 13:51:35 +10:00
..
base.ts Various changes to I/O handling (#2513) 2023-05-31 13:45:12 +10:00
ellipse.ts Various changes to I/O handling (#2513) 2023-05-31 13:45:12 +10:00
floats.ts image occlusion button in note editor (#2485) 2023-07-27 22:45:49 +10:00
from-cloze.ts image occlusion button in note editor (#2485) 2023-07-27 22:45:49 +10:00
polygon.ts Various changes to I/O handling (#2513) 2023-05-31 13:45:12 +10:00
position.ts Various changes to I/O handling (#2513) 2023-05-31 13:45:12 +10:00
rectangle.ts Various changes to I/O handling (#2513) 2023-05-31 13:45:12 +10:00
to-cloze.ts Fix polygon tool not working (#2712) 2023-10-10 13:51:35 +10:00