Skip to content

Commit e71bfd7

Browse files
Draggable while editing only
1 parent 291ac08 commit e71bfd7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/src/app/components/Map/MetaLayers.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ const PinCommentsLayer = () => {
286286
const mapMetadata = useMapMetadata();
287287
const setErrorNotification = useMapStore(state => state.setErrorNotification);
288288
const [popupIndex, setPopupIndex] = useState<number | null>(null);
289+
const isEditing = useMapStore(state => state.isEditing);
289290
const popupContent =
290291
popupIndex !== null && mapMetadata?.comments?.[popupIndex]?.type === 'location'
291292
? (mapMetadata?.comments?.[popupIndex] as LocationComment)
@@ -328,7 +329,7 @@ const PinCommentsLayer = () => {
328329
longitude={comment.lng}
329330
latitude={comment.lat}
330331
anchor="center"
331-
draggable={true}
332+
draggable={isEditing}
332333
onDragEnd={e => handleDrag(e, index)}
333334
onClick={() => {
334335
setPopupIndex(index);

0 commit comments

Comments
 (0)