diff --git a/src/components/laanc/map/LaancAreaMap.js b/src/components/laanc/map/LaancAreaMap.js index 432edca..47dcdeb 100644 --- a/src/components/laanc/map/LaancAreaMap.js +++ b/src/components/laanc/map/LaancAreaMap.js @@ -361,6 +361,11 @@ export default function LaancAreaMap({ }; const onMouseUp = e => { + e.preventDefault(); + setIsDrag(false); + }; + + const onMouseLeave = () => { setIsDrag(false); }; @@ -371,10 +376,12 @@ export default function LaancAreaMap({
{viewCoordObj?.map((obj, i) => { let coord = @@ -392,15 +399,17 @@ export default function LaancAreaMap({ className='coords-box' key={i} onClick={() => { - const allObj = drawObj - .getAll() - .features.filter( - o => o.properties.id !== 'BUFFER' && o.properties.id - ); - - drawObj.changeMode('direct_select', { - featureId: allObj[i].id - }); + if (!isDrag) { + const allObj = drawObj + .getAll() + .features.filter( + o => o.properties.id !== 'BUFFER' && o.properties.id + ); + + drawObj.changeMode('direct_select', { + featureId: allObj[i].id + }); + } }} >