Skip to content
Snippets Groups Projects
Commit a5dd7213 authored by David Bühler's avatar David Bühler
Browse files

[ivette] Marker info: a meta selection pins the selected marker.

parent 2801bf88
No related branches found
No related tags found
No related merge requests found
......@@ -324,6 +324,13 @@ export default function ASTinfo(): JSX.Element {
React.useEffect(() => {
markers.setLocations(selectedLoc, hoveredLoc);
}, [markers, selectedLoc, hoveredLoc]);
const pinMarker = (location: States.Location) : void => {
markers.setPinned(location?.marker, true);
};
React.useEffect(() => {
States.MetaSelection.on(pinMarker);
return () => States.MetaSelection.off(pinMarker);
});
// Rendering
const renderMark = (mark: Mark): JSX.Element | null => {
const { marker } = mark;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment