Commit d82a6980 authored by Dorian Goepp's avatar Dorian Goepp

Change the name of Interaction trace in the MobX store.

The data of the interaction trace object were stored in the global MobX store with the key "interactionTrace". To prepare for the further work, I changed it to match the name of this object as it is known to FlexLayout.
parent 3193d417
......@@ -26,7 +26,7 @@ class InteractionTrace extends Component {
super(props);
this.interactionStore = new InteractionTraceStore();
this.props.store.components['interactionTrace'] = this.interactionStore;
this.props.store.components['int-trace'] = this.interactionStore;
// Use the margin convention practice
this.margin = {top: 20, right: 30, bottom: 20, left: 20};
......
......@@ -8,10 +8,10 @@ export const LatestInteraction = observer(
function LatestInteraction(props) {
let intended, enacted;
let iteration = null;
if ('interactionTrace' in props.store.components && props.store.components['interactionTrace'].showInteraction) {
intended = props.store.components['interactionTrace'].currentInteraction.intended;
enacted = props.store.components['interactionTrace'].currentInteraction.enacted;
const iteration_id = props.store.components['interactionTrace'].currentInteraction.id;
if ('int-trace' in props.store.components && props.store.components['int-trace'].showInteraction) {
intended = props.store.components['int-trace'].currentInteraction.intended;
enacted = props.store.components['int-trace'].currentInteraction.enacted;
const iteration_id = props.store.components['int-trace'].currentInteraction.id;
iteration = [<p key="first"><span className="label">Iteration:</span> {iteration_id}</p>, <hr key="last"/>];
} else {
intended = props.intended;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment