From 37b38cf8acbcb13511e28cb4d9b3768a1f08250e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?junh=5Feee=28=EC=9D=B4=EC=A4=80=ED=9D=AC=29?= Date: Mon, 27 Nov 2023 17:31:36 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=84=ED=96=89=EA=B5=AC=EC=97=AD=20?= =?UTF-8?q?=EC=A2=8C=ED=91=9C=EC=A0=95=EB=B3=B4=EC=B0=BD=20=EB=A7=88?= =?UTF-8?q?=EC=9A=B0=EC=8A=A4=20=EB=93=9C=EB=9E=98=EA=B7=B8=20=ED=8F=AC?= =?UTF-8?q?=EC=9D=B8=ED=84=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/laanc/map/LaancAreaMap.js | 27 ++++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) 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 + }); + } }} >