list of gene variants is empty
list of variants retrieved by this js plugin is always empty:
var ELEMENT_ID = 18215;
minervaDefine({
register: function (object) {
console.log("registering test plugin");
$(object.element).append("<button id='get-selected'>selected overlays</button>");
$("#get-selected").on("click",function(){
object.project.map.getVisibleDataOverlays().then(function(overlays){
console.log("selected overlays", overlays);
var promises = []
for (var i=0;i<overlays.length;i++) {
var overlay = overlays[i];
if (overlay.getType() == "GENETIC_VARIANT") {
promises.push(overlay.getFullAliasesById(ELEMENT_ID));
} else {
console.log("Overlay "+overlay.getName()+" does not contain gene variants");
}
}
return Promise.all(promises);
}).then(function(selectedOverlayElementData){
for (var i=0;i<selectedOverlayElementData.length;i++) {
var overlayData = selectedOverlayElementData[i];
if (overlayData!==undefined && overlayData!==null) {
for (var j=0;j<overlayData.length;j++) {
console.log(overlayData[j]);
console.log(overlayData[j].getGeneVariants);
console.log("Gene variants",overlayData[j].getGeneVariants());
}
} else {
console.log("Element is not present in overlay");
}
}
});
});
},
unregister: function () {
console.log("unregistering test plugin");
},
getName: function () {
return "test plugin";
},
getVersion: function () {
return "0.0.1";
}
});