Skip to content
Snippets Groups Projects
Commit d2b48c0b authored by David Bühler's avatar David Bühler Committed by Maxime Jacquemin
Browse files

[ivette] On meta-selection, pins the selected location in the value table.

parent 106b9175
No related branches found
No related tags found
No related merge requests found
...@@ -991,6 +991,16 @@ function EvaTable(): JSX.Element { ...@@ -991,6 +991,16 @@ function EvaTable(): JSX.Element {
setTic(tac + 1); setTic(tac + 1);
}, [fcts, setTic, tac]); }, [fcts, setTic, tac]);
/* On meta-selection, pin the selected location. */
React.useEffect(() => {
const pin = (loc: States.Location): void => {
const {marker, fct} = loc;
if (marker && fct) setLocPin({ target: marker, fct }, true);
};
States.MetaSelection.on(pin);
return () => States.MetaSelection.off(pin);
});
/* Callback used to remove a probe */ /* Callback used to remove a probe */
const remove = React.useCallback((probe: Probe): void => { const remove = React.useCallback((probe: Probe): void => {
fcts.removeLocation(probe); fcts.removeLocation(probe);
......
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