Commit dc5caaac authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch...

Merge branch '1492-clicking-on-the-chemica-or-mirnal-target-in-popup-pin-changes-the-tab-to-drugs' into 'master'

Resolve "clicking on the chemica or mirnal target in popup pin changes the tab to drugs"

Closes #1492

See merge request !1322
parents d77fd9fe b70cfabc
Pipeline #43419 canceled with stage
in 44 seconds
......@@ -27,6 +27,8 @@ minerva (16.0.0~beta.1) stable; urgency=medium
* Bug fix: data overlays in comlex upload prevented error to be propagated
to user (#1499)
* Bug fix: searching for all chemicals by target did not work (#1490)
* Bug fix: searching by chemical/drug/mirna in left panel focus the proper
tab in the InfoWindow (#1492)
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 9 Jun 2021 15:00:00 +0200
......
......@@ -13,6 +13,9 @@ var Point = require('../canvas/Point');
var pileup = require('pileup');
var Promise = require("bluebird");
var ChemicalDbOverlay = require("../overlay/ChemicalDbOverlay");
var DrugDbOverlay = require("../overlay/DrugDbOverlay");
var MiRnaDbOverlay = require("../overlay/MiRnaDbOverlay");
/**
* @typedef {Object} PileupRange
......@@ -47,8 +50,17 @@ function AliasInfoWindow(params) {
return self.update();
};
var dbOverlaySearchChanged = function () {
return self.update();
var dbOverlaySearchChanged = function (arg) {
return self.update().then(function(){
if (arg.object instanceof ChemicalDbOverlay) {
$("a:contains(chemical)", self.getContent()).click();
} else if (arg.object instanceof DrugDbOverlay) {
$("a:contains(drug)", self.getContent()).click();
} else if (arg.object instanceof MiRnaDbOverlay) {
$("a:contains(mirna)", self.getContent()).click();
}
});
};
params.map.getTopMap().addListener("onShowOverlay", overlayListChanged);
......
Markdown is supported
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