Skip to content

Commit

Permalink
Fix annotations issues
Browse files Browse the repository at this point in the history
  • Loading branch information
laemtl committed Mar 27, 2023
1 parent bc5547e commit 6c33505
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ svg {
.list-group-item {
position: relative;
display: flex;
flex-direction: row;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
Expand All @@ -65,13 +65,14 @@ svg {
justify-content: center;
align-items: center;
position: absolute;
right: 0;
right: 10px;
}

.epoch-tag {
padding: 5px;
background: #e7e4e4;
border-left: 5px solid #797878;
width: 100%;
}

.epoch-tag p {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,6 @@ const EventManager = ({
(epoch.type == 'Annotation' ? 'annotation ' : '')
+ 'list-group-item list-group-item-action'
}
style={{
position: 'relative',
}}
>
<div
className="epoch-details"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ class ElectrophysioAnnotations

//Insert new files and data into DB
if (empty($annotationFIDs)) {
//Create new annotation files
$this->_createFiles();

//Get new annotation file ID
$annotation_tsv_ID = $db->pselectOne(
Expand All @@ -164,8 +166,6 @@ class ElectrophysioAnnotations
);

$metadata['AnnotationFileID'] = $annotation_json_ID;
$instance['AnnotationFileID'] = $annotation_tsv_ID;

$db->insert("physiological_annotation_parameter", $metadata);

//Get new metadata file ID
Expand All @@ -176,8 +176,8 @@ class ElectrophysioAnnotations
['annotation_ID' => $annotation_json_ID]
);

$instance['AnnotationFileID'] = $annotation_tsv_ID;
$instance['AnnotationParameterID'] = $metadata_ID;

$db->insert("physiological_annotation_instance", $instance);

} else {
Expand Down Expand Up @@ -584,8 +584,10 @@ class ElectrophysioAnnotations
WHERE PhysiologicalFileID=:PFID",
['PFID' => $this->_physioFileID]
);
$filepath = $dataDir.$filepath;

if (!$filepath) {
continue;
}
$filepath = $dataDir.$filepath;
$arch_file = new \PharData($filepath);
foreach ($paths as $path) {
$arch_file->addFile($path, basename($path));
Expand Down

0 comments on commit 6c33505

Please sign in to comment.