diff --git a/src/components/MapPreview/MapPreview.js b/src/components/MapPreview/MapPreview.js index 6f8b2db..804ecc5 100644 --- a/src/components/MapPreview/MapPreview.js +++ b/src/components/MapPreview/MapPreview.js @@ -40,6 +40,7 @@ const MapPreview = ({ mapRef, useMapEffect, disableDraw = true, + disableEdit = false, drawControlOptions, onDrawCreated, onDrawEdited, @@ -180,7 +181,8 @@ const MapPreview = ({
{ displayAccessRequests={false} displayAOIDetails={false} disableDraw={false} + disableEdit={false} onDrawCreated={handleOnDraw} onDrawEdited={handleOnEdit} featureRef={featureRef} diff --git a/src/components/MapPreviewDraw/MapPreviewDraw.js b/src/components/MapPreviewDraw/MapPreviewDraw.js index b517bf7..fad86bf 100644 --- a/src/components/MapPreviewDraw/MapPreviewDraw.js +++ b/src/components/MapPreviewDraw/MapPreviewDraw.js @@ -29,6 +29,7 @@ const MapPreviewDraw = ({ forwardedRef, onCreated, onEdited, + disableDrawControls = false, disableEditControls = false, controlOptions, shapeOptions, @@ -99,7 +100,7 @@ const MapPreviewDraw = ({ return ( {children} - {!disableEditControls && ( + {!disableDrawControls && ( <> @@ -127,6 +128,7 @@ MapPreviewDraw.propTypes = { forwardedRef: PropTypes.object, onCreated: PropTypes.func, onEdited: PropTypes.func, + disableDrawControls: PropTypes.bool, disableEditControls: PropTypes.bool, controlOptions: PropTypes.object, shapeOptions: PropTypes.object,