feat: freeform drawing and annotation support to image occlusion #2983
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added support for freeform drawing and annotation. The freeform data is stored in image field as svg. When editing the svg data parsed as canvas object then again saved as svg in image field. The freedraw image is second layer hidden below occlusion and above original image.
When path tool selected freedraw enabled and these data are stored as string in image field. When annotation tool, in topbar selected, all the shapes are drawn as annotation with semi-transparent color with
isAnnotation
attribute added to fabric object for that shape. AlsoPath
class added to support type, it is not added to cloze occlusion field. The data are stored in image field.I have tried to add annotation support for shapes other than path using cloze ordinal 0, it works when added but after editing some card removed (also tried
ia=1
is annotation) . @dae @abdnh, I need help on this issues.