diff --git a/src/components/Decode.js b/src/components/Decode.js index 2baffe4..1b3a582 100644 --- a/src/components/Decode.js +++ b/src/components/Decode.js @@ -31,11 +31,18 @@ export const Decode = () => { activeClass ); const olFeatures = features2olFeatures(features); + // Add items dispatchSetItems({ type: "SET_ITEMS", payload: [...items, ...olFeatures], }); + // Set empty the point selectors + dispatchSetPointsSelector({ + type: "SET_EMPTY_POINT", + payload: [], + }); + // save in iddexedDB features.forEach((feature) => { storeItems.addData(feature); @@ -122,10 +129,6 @@ export const Decode = () => { multiDecoderType ); await decodePrompt(reqProps); - dispatchSetPointsSelector({ - type: "SET_EMPTY_POINT", - payload: [], - }); }; const setDecodeType = (decodeType) => { diff --git a/src/components/map/ProjectLayer.js b/src/components/map/ProjectLayer.js index 3adac80..3ca2e61 100644 --- a/src/components/map/ProjectLayer.js +++ b/src/components/map/ProjectLayer.js @@ -120,7 +120,7 @@ export const ProjectLayer = ({ project, items, highlightedItem }) => { // Display points selector in the map useEffect(() => { if (!map) return; - if (pointsSelector.length === 0) return; + // if (pointsSelector.length === 0) return; const pointsSelectorDataSource = new VectorSource({ features: pointsSelector,