We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

Annotations stops drawing and starts again

I started drawing some annotations, but while I was drawing it, it stopped and started again even though I haven’t left the mouse button.

(https://forum.groupdocs.app/uploads/groupdocs_app/3424) (191.7 KB)
Git project: https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-Java
Git branch: master
Git revision: aeb3d5d9
Browser: Chrome Version 92.0.4515.159 (Official Build) (64-bit)
SO: Windows 10
Java version: 1.8.0_281
watermark-lose-content.7z (192 KB)
annotation-stop-resize-and-start-again.png (88.0 KB)


We’ve created an issue in our bug-tracking system with ID ANNOTATIONJAVA-1337. You’ll be notified in case of any update.

1 Like

Just to share some knowledge, I figure out the problem was happening by a conflict of events, so to fix this I removed the pan events and change the rule of mousedown and touchstart event, instead of checking isDesktop variable that just look the screen size, I change the rule to apply which event if the device has or not touch events, so for desktop it will apply mousedown event and for mobile devices, it will apply touchstart event.

<div class="doc-panel" *ngIf="file" (mousedown)="!isTouch ? createAnnotation($event) : ''"
     (touchstart)="isTouch ? createAnnotation($event) : ''" 
  <gd-document class="gd-document" *ngIf="file" [file]="file" [mode]="htmlModeConfig" gdScrollable
               [preloadPageCount]="preloadPageCountConfig" gdRenderPrint [htmlMode]="htmlModeConfig" (onpan)="onPan($event)"></gd-document>

  this.isTouch = window.matchMedia("(pointer: coarse)").matches;

It works for me, but I know how pan events work, so maybe you will have a better solution.

And this is the link that helped me to achieve this solution:

1 Like


We surely will look into this.