PDFJsAnnotations icon indicating copy to clipboard operation
PDFJsAnnotations copied to clipboard

better click handler

Open mankowitz opened this issue 2 years ago • 1 comments

When creating rectangles, it is counterintuitive that if the rectangle tool is selected and I try to resize or move another object, it will draw another rectangle. This only triggers the handler if it is a plain click.

mankowitz avatar Jan 02 '22 07:01 mankowitz

@mankowitz thanks for the PR. I think with one small change we can do a bit of cleanup to the code. Instead of Math functions, we can use Fabric's http://fabricjs.com/docs/fabric.Point.html#distanceFrom function to calculate the distance between points. I'll test this a little bit and merge it with the change. Thanks again.

RavishaHesh avatar Jan 02 '22 10:01 RavishaHesh