Closed srobb1 closed 2 years ago
can you check the javascript console to see if there are errors? black I think often means there is a syntax error
The only one I have is one that is always there
Uncaught (in promise) Error: getTranslators: detection is already running
at Zotero.Translate.Web.<anonymous> (translate.js:1112:45)
at Zotero.Translate.Web.getTranslators (promise.js:36:17)
at Object.init (inject.js:108:25)
at Object.historyChanged (inject.js:692:21)
at messageListener (messaging_inject.js:122:50)
at messaging_inject.js:132:6
I don't know. It is working now. I tried to get the console to print type and it would never print 'mRNA'. So i did this instead, and it is working. console will print out tRNA and rRNA. I am not sure what is up with my type 'mRNA'. The info box clearly says mRNA and if I get the label to print type, I see mRNA. Oh well. I have what I need.
"color": "function(feature) { type=feature.get('type');if (type.indexOf('rRNA')==0){return 'coral'}else if(type.indexOf('tRNA')==0){return 'green'}else{ return 'orange' }}",
nice :) chrome often aggressively caches the trackList.json files so need to do full clear cache to see the updates to trackList.json sometimes. small faq entry about things i've run into
Thanks!
Ok. this is probably a super easy one:
In Jbrowse 1, I want to color my canvas glyph blue if is of type mRNA and red otherwise, but they are all colored black. What have I done wrong with my javascript?
I see the example here and i modeled mine after it: https://jbrowse.org/docs/faq.html#how-do-i-customize-feature-colors-with-canvasfeatures
Thank you, Sofia