diff --git a/src/containers/flight/OperationApprovalsContainer.js b/src/containers/flight/OperationApprovalsContainer.js index 6e34c5c8..725a901e 100644 --- a/src/containers/flight/OperationApprovalsContainer.js +++ b/src/containers/flight/OperationApprovalsContainer.js @@ -460,6 +460,12 @@ export default function OperationApprovalsContainer({ mode }) { if (dataBlock) { dataBlock.remove(); } + if ( + drawObj.getMode() === 'draw_line_string' || + drawObj.getMode() === 'draw_polygon' + ) { + return; + } const data = e.features[0].properties; const lnglat = JSON.parse(data?.center); diff --git a/src/utility/MapUtils.js b/src/utility/MapUtils.js index 3307e97b..d1e393c3 100644 --- a/src/utility/MapUtils.js +++ b/src/utility/MapUtils.js @@ -792,7 +792,6 @@ export const handlerDrawEvents = ( }); mapInstance.on('draw.create', e => { - console.log(e); drawEndCallback(e.features.length); mouseCursorRef.current.style.display = 'none'; mouseCursorRef.current.style.innerText = ''; @@ -803,7 +802,6 @@ export const handlerDrawEvents = ( if (obj.mode === 'simple_select') { const featuresLength = drawObj.getAll().features.length; if (!featuresLength) { - console.log('!?!?'); drawEndCallback(drawObj.getAll().features.length); } }