Closed alextychan closed 6 years ago
Resuming #102
I've also noticed that after drawing a shape and adding a point. When you zoom in and add a new point, the position of the point is incorrect. This should be a bug fix for another issue/pull request.
@alextychan Do you mean we should raise another PR for bug fix or you mean this is the bug introduced due to some PR in past?
first we need to understand why is it happening.
The bug exists originally, probably in some previous PR in the past.
Steps to reproduce: 1) Add a shape. 2) Add a point 3) Zoom In/out 4) Add a new point
Expected result: point should be drawn in the shape at the place we clicked Obtained result: point drawn outside of shape at an offset
I suggest that we should open a new issue to tackle this bug.
The copy-paste feature should be complete.
Thanks @alextychan to report the issue. I've raised the bug.
I have found the bug for #104 and have a fix for it. Will push it once this pull request is resolved.
@alextychan is it possible for you to raise PR against copy-paste branch? So I can test the app for doubtful areas before merging to master.
Otherwise I can clone your PR on my local to test it. Give me some time.
@alextychan I've removed offline installers to other repository. Can you please syn to master branch? It'll speed up cloning.
I have switched PR to compare with the "copy-paste" branch. Please have a look. I'll push the fix for #104 in a later PR.
I am unable to reproduce the error. Could you provide some steps to reproduce it?
@amitguptagwl I think you are referencing this issue #86. I will look into it separately.
@alextychan yes you're right. #86 is a missing feature till now. And doesn't break any functionality or error. But after this PR it'l become a bug for particular case. Hence we need to handle at least for copy paste scenario.
If in case I'm not able to clean my point, I can make a small animation to explain it.
What you can do at least is to unmount label tag riot.unmount('label-panel)
or update it with newly pasted shape: riot.mount('label-panel', { id : currentTool.node.id })
. Then this case can be handled gracefully separately without leaving any bug behind.
@amitguptagwl That is strange indeed. I have checked my local branch and there doesn't seem to be any problems.
Here are the steps to reproduce it.
Repeat the same steps but delete the point from the workarea directly instead of label panel. You'll not notice any issue.
@amitguptagwl Okay, I am able to reproduce the issue. Will push a fix for it.
I have patched the bug. Please check.
Thanks for your PR.
You can also submit the detail of this PR on steemit.com to earn some rewards. Check this submission for more idea: https://steemit.com/utopian-io/@alvinvoo/project-update-imglab-new-features
Purpose / Goal
Implemented copy paste svg elements.
Here's a brief description of the current implementation.
"Copy" will grab the shape and point metadata and store it in copiedElements array. The reason I store metadata rather than the object itself is to allow copy-pasting between images, because some metadata requires context that changes, like shape.rbox(myCanvas).
"Paste" will add all the shapes and points into the image, then call self.update() which redraws the current shapes in the image.
In conjunction with issue #53
Type
Please mention the type of PR
Note : Please ensure that you've read contribution guidelines before raising this PR.