Bug report - resizing annotations

WebViewer Version: Has been observed on both 8.12.1 and 10.7.3

Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? Yes, have forked react sample for repro example
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? Untested
Is your issue related to a front-end framework? Unsure
Is your issue related to annotations? Yes

Calling enableImmediateActionOnAnnotationSelect() on the AnnotationEditTool breaks resizing for free text annotations.

I have set up a minimal reproduction sample on code sandbox.

Reproduction steps:

  1. Call enableImmediateActionOnAnnotationSelection() for the annotation edit tool (Tool.ToolNames.EDIT) - this step has already been implemented in the repro example
  2. Create a free text annotation
  3. Deselect the free text annotation
  4. Select the annotation edit tool as the active tool (click on selectToolButton element)
  5. Select the free text annotation and attempt to resize it from the corners

Hi there,

Thanks for reaching out to WebViewer forums,

I was unable to reproduce this issue on the provided environment and on 8.12 sample. Please see the videos here: 77887

Is there a step I am missing in the above videos? Could you please share a video of the issue?

Best regards,
Kevin Kim

Hi Kevin,

Thanks for looking into this. Here is a video of the bug (video expires in 2 days). It seems like the reproduction steps do not work consistently, you may have to try a few times. The resizing with the edit tool also seems to work correctly after resizing with a different tool (seen in video).

In our usage it is a larger issue because we disable the toolbar and programatically add free text annotations, in which case it occurs 100% of the time.

I have been able to work around like so:

documentViewer.addEventListener('mouseLeftDown', (e: MouseEvent) => {
    const annotation = annotationManager.getAnnotationByMouseEvent(e);
    if (annotation) {
        annotationManager.deselectAllAnnotations();
        annotationManager.selectAnnotation(annotation);
    }
});

This seems to perfectly mimic the behaviour of enableImmediateActionOnAnnotationSelection().

Hi there,

Thank you for your response,

I was able to reproduce this issue when the free-text annotation is created via a click, rather than by drawing a rectangle.

We will add this bug to our backlog for our product team to review.

Best regards,
Kevin Kim

1 Like