Open Kampii opened 8 years ago
Hello @Kampii,
Do you mean something like an eraser kind of button? Something that would allow the user to go over the image erasing parts of the annotations?
You know like in fabricjs (http://fabricjs.com/) you can select an element and delete it. The link I gave does not provide the functionality, but it just illustrates how one can delete the element.
Hey Emigre, when looking at your demo image, I think I just realized that it adds the annotation similarly like MS Paint, is that right? Do you have a demo page to play with?
Ah, I see what you mean. Well, this is not something that you can do at the moment. It is doable, yes, but it would require a certain amount of work. It looks like a good addition, but I would need to have the time to invest on it.
Yes, you draw over the image like in Paint, but the strokes are vectorial, so it would be possible to erase them separately as you say. I did this example page at some point, I hope it still works.
You should have an email from me :)
:thumbsup:
An eraser tool is added to this branch, most of the job has been done thanks to @j-hudecek, with some additional adaptations from my side to the new structure in 1.0.0. Although it does the job in a basic way, I don't think it is ready to be used.
For example, the way the eraser behaves at the moment, you click on a line and then the whole stroke disappears. As an user I would expect the eraser to behave like the eraser from most graphic programs such as Photoshop, erasing only the part of the stroke that is below a certain radio around the cursor.
Apart from that, I have noticed that the calculation of which stroke to delete depending on the cursor position does not work very well sometimes.
Because of these details I don't think that it's ready to be used. I'd like to merge this functionality to master but it still needs some development until it's ready, in my opinion.
It's a pity but I don't think that I have the time to work in this feature at the moment - perhaps in the future. Contributions welcomed!
Hello @Kampii , because of work reasons, I also encountered deletion problems. Thanks to @Emigre , I reintegrated his code and wrote demo.
Links: Https://github.com/jerrygit1/openseadragon-draw
I hope I can help you.
@Kampii, we spoke about the plugin some time ago. I hope all is well. I just wanted to let you know that I'm going to discontinue it, please keep a fork if you need it.
Is that doable?