elfalem / Leaflet.curve

A Leaflet plugin for drawing Bézier curves and other complex shapes.
Other
218 stars 52 forks source link

Strange error when using leaflet-lasso with leaflet-curve #49

Closed eric-g-97477 closed 2 years ago

eric-g-97477 commented 2 years ago

I have a code pen demonstrating the issue at https://codepen.io/ericg_off/pen/JjLGWLw

I am using:

To reproduce:

  1. Click on the lasso control in the upper right corner.
  2. Draw a lasso around the markers

The following error will appear:

t-spatial.esm.js:522 Uncaught TypeError: Cannot read properties of undefined (reading 'type')
    at t (t-spatial.esm.js:522:15)
    at calc.ts:6:20
    at Array.filter (<anonymous>)
    at U (calc.ts:58:35)
    at e.finish (lasso-handler.ts:189:34)
    at e.onDocumentMouseUp (lasso-handler.ts:151:14)
t @ t-spatial.esm.js:522
(anonymous) @ calc.ts:6
U @ calc.ts:58
e.finish @ lasso-handler.ts:189
e.onDocumentMouseUp @ lasso-handler.ts:151

iframeConsoleRunner-7549a40147ccd0ba0a6b5373d87e770e49bb4689f1c2dc30cccc7463f207f997.js:1 mouseup event was missed

I am not sure if the actual bug is in the lasso code or in the curve code.

eric-g-97477 commented 2 years ago

As confirmed by the leaflet-lasso author, the bug is on their end.

elfalem commented 2 years ago

Thanks for the detailed description and follow-up. It's greatly appreciated.