Commit 7cc1645a authored by Lukas Pravda's avatar Lukas Pravda
Browse files

fix broken molstar event handling

parent 1fdd03d2
Pipeline #100274 passed with stages
in 53 seconds
...@@ -108,6 +108,10 @@ class Visualization { ...@@ -108,6 +108,10 @@ class Visualization {
return; return;
} }
}); });
this.links.attr('opacity', 1);
this.nodes.attr('opacity', 1);
} }
private linkMouseOverEventHandler(x: Model.Link, i: number, g: any) { private linkMouseOverEventHandler(x: Model.Link, i: number, g: any) {
...@@ -138,6 +142,9 @@ class Visualization { ...@@ -138,6 +142,9 @@ class Visualization {
this.fireExternalNullEvent(Config.interactionMouseoutEvent); this.fireExternalNullEvent(Config.interactionMouseoutEvent);
} }
this.links.attr('opacity', 1);
this.nodes.attr('opacity', 1);
} }
private dragHandler = d3.drag() private dragHandler = d3.drag()
...@@ -289,11 +296,7 @@ class Visualization { ...@@ -289,11 +296,7 @@ class Visualization {
public toogleZoom(active: boolean) { public toogleZoom(active: boolean) {
if (active) { this.zoomHandler = active ? this.getZoomHandler() : undefined;
this.zoomHandler = this.getZoomHandler();
} else {
this.zoomHandler = undefined;
}
} }
...@@ -849,27 +852,12 @@ class Visualization { ...@@ -849,27 +852,12 @@ class Visualization {
private nodeDim(x: Model.InteractionNode, i: number, g: any) { private nodeDim(x: Model.InteractionNode, i: number, g: any) {
x.scale = 1.0; if (!x.residue.isLigand) x.scale = 1.0;
if (x.residue.isLigand) d3.select(g[i]).style('cursor', 'default'); if (x.residue.isLigand) d3.select(g[i]).style('cursor', 'default');
d3.select(g[i]) d3.select(g[i])
//.transition() //.transition()
.attr('transform', `translate(${x.x},${x.y}) scale(${x.scale})`); .attr('transform', `translate(${x.x},${x.y}) scale(${x.scale})`);
this.links.attr('opacity', 1);
this.nodes.attr('opacity', 1);
// g.forEach((_, index) => {
// if (i != index) {
// d3.select(g[index])//.transition()
// .attr('opacity', 1);
// }
// });
// this.links
// .filter((l: Model.Link) => !l.containsNode(x))
// //.transition()
// .attr('opacity', 1);
} }
......
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