Unverified Commit 13cc771b authored by Elias Harkins's avatar Elias Harkins Committed by GitHub

Merge pull request #1175 from dos077/zoom_state_fix

fix bug of gmax&gmin query earse on any other entropy brush
parents 05efebfd 288aef7a
......@@ -442,12 +442,20 @@ EntropyChart.prototype._addBrush = function _addBrush() {
this.brushFinished = function brushFinished() {
this.brushed();
/* if the brushes were moved by box, click drag, handle, or click, then update zoom coords */
if (d3event.sourceEvent instanceof MouseEvent && (!d3event.selection || d3event.sourceEvent.target.id === "d3entropyParent" ||
d3event.sourceEvent.target.id === "")) {
this.props.dispatch(changeZoom(this.zoomCoordinates));
} else {
/* If selected gene or clicked on entropy, hide zoom coords */
this.props.dispatch(changeZoom([undefined, undefined]));
if (d3event.sourceEvent instanceof MouseEvent) {
if (
!d3event.selection ||
d3event.sourceEvent.target.id === "d3entropyParent" ||
d3event.sourceEvent.target.id === ""
) {
this.props.dispatch(changeZoom(this.zoomCoordinates));
} else if (
d3event.sourceEvent.target.id.match(/^prot/) ||
d3event.sourceEvent.target.id.match(/^nt/)
) {
/* If selected gene or clicked on entropy, hide zoom coords */
this.props.dispatch(changeZoom([undefined, undefined]));
}
}
};
......
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