Skip to content

Commit

Permalink
Fixed event update
Browse files Browse the repository at this point in the history
  • Loading branch information
laemtl committed Feb 14, 2024
1 parent 5436917 commit 46e6dce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,14 @@ const AnnotationForm = ({

const data = response.instance;

const epochLabel = [null, 'n/a'].includes(data.instance.TrialType)
? null
: data.instance.TrialType;
const newAnnotation : EpochType = {
onset: parseFloat(data.instance.Onset),
duration: parseFloat(data.instance.Duration),
type: 'Event',
label: data.instance.EventValue, // Unused
label: epochLabel ?? data.instance.EventValue,
value: data.instance.EventValue,
trialType: data.instance.TrialType,
properties: data.extraColumns,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class ElectrophysioEvents
);

$this->_data = [
'instances' => $taskEvents,
'extraColumns' => $extraColumns,
'instances' => $taskEvents,
'extraColumns' => $extraColumns,
];
}

Expand Down Expand Up @@ -148,8 +148,8 @@ class ElectrophysioEvents
);

return [
'instance' => $taskEvent[0],
'extra_columns' => $extraColumns,
'instance' => $taskEvent[0],
'extraColumns' => $extraColumns,
];
}
return [];
Expand Down

0 comments on commit 46e6dce

Please sign in to comment.