Closed JobLeonard closed 7 years ago
Huh... that was easy...
function returnFirstMatchingKey(obj, keyList){
for (let i = 0; i < keyList.length; i++){
if (obj[keyList[i]]) {
return keyList[i];
}
}
return '';
}
So right now initial default values are hardcoded with an
initialState
object, and loaded in whenever the relevant view is opened for the first time:This works, _as long as
_X
,_Y
, andClusters
exist in the Loom file_. For older files this is an issue. For example, some loom files have noClusters
attribute, butClass
. This leads to views that require the user to manually search what attributes it does have to get a plot to show, which can be tiresome.There are two ways to improve this: