Browse Source

fix: Fixed click logging.

master
Denis Thiessen 6 months ago
parent
commit
486cd86f97
  1. 13
      src/core/log/SensorLogger.jsx

13
src/core/log/SensorLogger.jsx

@ -12,8 +12,19 @@ export function pushToClickLog(logElement) {
return;
}
const generateLogElement = (el) => {
const currentTime = new Date();
return {
target: el.target.outerHTML,
type: el.type,
x: el.x,
y: el.y,
timestamp: currentTime,
};
};
const sensorLog = getState().sensorLog;
sensorLog.clickedElements.push(logElement);
sensorLog.clickedElements.push(generateLogElement(logElement));
setState({ sensorLog: sensorLog });
}

Loading…
Cancel
Save