Skip to content

Commit

Permalink
Call postMessage on mouse-over to select in table
Browse files Browse the repository at this point in the history
We now post a message to the main window to highlight the current
feature in the table of domains.

Refs pombase/website#2203
Refs pombase/website#2255
Refs pombase/pombase-chado#1218
  • Loading branch information
kimrutherford committed Oct 21, 2024
1 parent 0a0424f commit bc1d1f0
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,10 @@
highlightHoverElement: false,
highlightHoverPosition: false,
elementEnterCallBack: function(obj, e) {
if (obj.matchId) {
window.top.postMessage({selectedProteinFeatureId: obj.matchId}, '*');
}

if (obj.displayName) {
const tip = tippy(e.target);
let props = { ... tippyProps };
Expand Down Expand Up @@ -644,6 +648,10 @@
}
},
elementLeaveCallBack: function(obj, e) {
if (obj.matchId) {
window.top.postMessage({selectedProteinFeatureId: null}, '*');
}

if (obj.id && tooltips[obj.id]) {
const tip = tooltips[obj.id];
tip.destroy();
Expand Down

0 comments on commit bc1d1f0

Please sign in to comment.