annotorious-v1 icon indicating copy to clipboard operation
annotorious-v1 copied to clipboard

How to override editAnnotation from from image.annotator inside plugin

Open headkit opened this issue 7 years ago • 0 comments

hi! I am new to this framework. I like it a lot - thanx for sharing it!

I want to make annotation rectangles clickable. I first tried to add a mouseup event to the canvas and if the popup is visible then trigger the click event from the edit button. unfortunately this is not working because the rectangle is removed due to the

this._viewer.removeAnnotation(annotation);

in editAnnotation() from image.annotator

I then thought about overriding editAnnotation, adding a sceond parameter 'shouldRemoveRect' or something, but I don't know how to reach _viewver since it is private.

it may be that I did not understand the construction of the framework correctly. Could you please give me a hint how to solve this? thnx!

headkit avatar Apr 24 '18 13:04 headkit