Strange error when using leaflet-lasso with leaflet-curve
eric-g-97477 opened this issue · comments
I have a code pen demonstrating the issue at https://codepen.io/ericg_off/pen/JjLGWLw
I am using:
- https://unpkg.com/leaflet@1.8.0/dist/leaflet.js
- https://unpkg.com/leaflet-lasso@2.2.8/dist/leaflet-lasso.umd.min.js
- https://unpkg.com/@elfalem/leaflet-curve@0.9.1/dist/leaflet.curve.js
To reproduce:
- Click on the lasso control in the upper right corner.
- 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.
As confirmed by the leaflet-lasso author, the bug is on their end.
Thanks for the detailed description and follow-up. It's greatly appreciated.