Skip to content
Snippets Groups Projects
Unverified Commit 098164c3 authored by xgui3783's avatar xgui3783 Committed by GitHub
Browse files

Merge pull request #249 from HumanBrainProject/bugfix/previewingArea44ReceptorData

bugfix: preview area 44 receptor data
parents 76b3eaac e0c020de
No related branches found
No related tags found
No related merge requests found
...@@ -137,7 +137,8 @@ readConfigFile('waxholmRatV2_0.json') ...@@ -137,7 +137,8 @@ readConfigFile('waxholmRatV2_0.json')
const filterByPRs = (prs, atlasPr) => atlasPr const filterByPRs = (prs, atlasPr) => atlasPr
? prs.some(pr => { ? prs.some(pr => {
const regex = new RegExp(pr.name.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'), 'i') const regex = new RegExp(pr.name.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'), 'i')
return atlasPr.some(aPr => regex.test(aPr.name)) return atlasPr.some(aPr => regex.test(aPr.name)
|| aPr.synonyms && aPr.synonyms.length && aPr.synonyms.some(syn => syn === pr.name) )
}) })
: false : false
......
This diff is collapsed.
...@@ -2901,6 +2901,10 @@ ...@@ -2901,6 +2901,10 @@
74, 74,
75 75
], ],
"synonyms":[
"Area 44v",
"Area 44d"
],
"labelIndex": 2, "labelIndex": 2,
"ngId": "jubrain v17 left", "ngId": "jubrain v17 left",
"children": [], "children": [],
...@@ -2917,6 +2921,10 @@ ...@@ -2917,6 +2921,10 @@
74, 74,
75 75
], ],
"synonyms":[
"Area 44v",
"Area 44d"
],
"ngId": "jubrain v17 right", "ngId": "jubrain v17 right",
"labelIndex": 2, "labelIndex": 2,
"children": [], "children": [],
......
...@@ -2901,7 +2901,12 @@ ...@@ -2901,7 +2901,12 @@
74, 74,
75 75
], ],
"synonyms":[
"Area 44v",
"Area 44d"
],
"labelIndex": 2, "labelIndex": 2,
"ngId": "jubrain colin v17 left", "ngId": "jubrain colin v17 left",
"children": [], "children": [],
"position": [ "position": [
...@@ -2917,6 +2922,10 @@ ...@@ -2917,6 +2922,10 @@
74, 74,
75 75
], ],
"synonyms":[
"Area 44v",
"Area 44d"
],
"ngId": "jubrain colin v17 right", "ngId": "jubrain colin v17 right",
"labelIndex": 2, "labelIndex": 2,
"children": [], "children": [],
......
...@@ -74,7 +74,6 @@ export class DataBrowser implements OnDestroy,OnInit{ ...@@ -74,7 +74,6 @@ export class DataBrowser implements OnDestroy,OnInit{
this.dbService.getDataByRegion({ regions, parcellation, template }) this.dbService.getDataByRegion({ regions, parcellation, template })
.then(de => { .then(de => {
this.dataentries = de this.dataentries = de
this.fetchingFlag = false
return de return de
}) })
.then(this.dbService.getModalityFromDE) .then(this.dbService.getModalityFromDE)
...@@ -83,9 +82,11 @@ export class DataBrowser implements OnDestroy,OnInit{ ...@@ -83,9 +82,11 @@ export class DataBrowser implements OnDestroy,OnInit{
}) })
.catch(e => { .catch(e => {
console.error(e) console.error(e)
this.fetchingFlag = false
this.fetchError = true this.fetchError = true
}) })
.finally(() => {
this.fetchingFlag = false
})
this.subscriptions.push( this.subscriptions.push(
merge( merge(
......
...@@ -34,7 +34,9 @@ export class FilterDataEntriesByRegion implements PipeTransform{ ...@@ -34,7 +34,9 @@ export class FilterDataEntriesByRegion implements PipeTransform{
/** /**
* TODO replace pseudo id with real uuid * TODO replace pseudo id with real uuid
*/ */
return (r.id && id && r.id === id) || regex.test(r.name) return (r.id && id && r.id === id)
|| regex.test(r.name)
|| r.synonyms && r.synonyms.length && r.synonyms.some(syn => syn === name)
/** /**
* more correct, but probably should use UUID in the future * more correct, but probably should use UUID in the future
*/ */
......
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