Closed rastogi-bhavya closed 1 year ago
Current fix is a check while creating the output SVG. While creating the file, I am checking to see if each component has necessary features needed for it to be drawn. For eg, to draw a rectangle you need x, y, height, width. If any of this is not present it cannot be drawn.
The proper fix would be to not allow such a component to be created.
Empty SVG files should not be created. Example: if the user clicks on a drawing tool and clicks on the image and then clicks on save, an empty svg file (file having no elements like path, rect) is created and stored into the DB. When the page is reloaded this empty file is displayed in the annotations on the left hand side but there is no annotation drawn.
@rastogi-bhavya If this is not something that you're actively working on, change the pipeline to "this month". The bug is "fixed" and the rest of the changes that you described in your comment is just improvement for the code.
The empty annotation is created when users start a drawing event, and we're making sure to remove it if it remains empty (user clicks on a drawing tool and never draws anything). So I'm going to close this issue.
While adding a new annotations, empty elements are created. This should not happen.
`<svg viewBox=‘0 0 17451 18493’ color=‘#DD57AA’ xmlns=‘http://www.w3.org/2000/svg’ xmlns:xlink=‘http://www.w3.org/1999/xlink’>