Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 0 additions & 69 deletions ui/src/Components/Visualizer/Visualizer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Labels from "./Labels";
import { AppContext } from "../../AppContext";
import PropType from "prop-types";
import { convertDateToString } from "../../util/conversion";
import VisualizerImageryControls from "./VisualizerImageryControls"
import "../../assets/css/visualizer.css";
import { getAzureMapsAuthOptions } from "../../util/azureMapsAuth";
import { shouldIgnoreShortcut } from "../keyboardShortcuts";
Expand All @@ -30,13 +29,6 @@ const Visualizer = ({ setModalComponent }) => {
const zoomControlRef = useRef(null);
const [swipeStateMobile, setSwipeStateMobile] = useState("post");

const [imageryValues, setImageryValues] = useState({
opacity: 1,
contrast: 0,
hueRotation: 0,
saturation: 0,
});

// Visualizer data fetching function
async function getVisualizerResults() {
setIsLoading(true);
Expand Down Expand Up @@ -397,60 +389,6 @@ const Visualizer = ({ setModalComponent }) => {
}
}

const updateImageryProperties = (key, value) => {
try {

var preImageryRef = getLayerById(primaryMapRef, "preDisasterImagery");
var postImageryRef = getLayerById(secondaryMapRef, "postDisasterImagery");

preImageryRef.setOptions({
[key]: value,
});

postImageryRef.setOptions({
[key]: value,
});

setImageryValues({
...imageryValues,
[key]: value,
});

} catch (error) {
console.error("Error updating imagery values:", error);
}
};

const resetImageryProperties = () => {
try {

var preImageryRef = getLayerById(primaryMapRef, "preDisasterImagery");
var postImageryRef = getLayerById(secondaryMapRef, "postDisasterImagery");

preImageryRef.setOptions({
opacity: 1,
contrast: 0,
hueRotation: 0,
saturation: 0,
});

postImageryRef.setOptions({
opacity: 1,
contrast: 0,
hueRotation: 0,
saturation: 0,
});

setImageryValues({
opacity: 1,
contrast: 0,
hueRotation: 0,
saturation: 0,
});
} catch (error) {
console.error("Error resetting imagery values:", error);
}
};


return (
Expand All @@ -467,13 +405,6 @@ const Visualizer = ({ setModalComponent }) => {
setSwipeStateMobile={setSwipeStateMobile}
swipeStateMobile={swipeStateMobile}
/>

<VisualizerImageryControls
updateImageryProperties={updateImageryProperties}
resetImageryProperties={resetImageryProperties}
imageryValues={imageryValues}
visualizerResults={globalVisualizerResults}
/>
</div>
);
};
Expand Down
140 changes: 0 additions & 140 deletions ui/src/Components/Visualizer/VisualizerImageryControls.jsx

This file was deleted.

Loading