Skip to content

Commit

Permalink
Fix the shift/option + mouseWheel zoom bug in entropy panel
Browse files Browse the repository at this point in the history
  • Loading branch information
hangzhou-salesforce committed Jul 16, 2020
1 parent 631fa8d commit f0d4d59
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/entropy/entropyD3.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,16 @@ EntropyChart.prototype._addBrush = function _addBrush() {
/* If selected gene or clicked on entropy, hide zoom coords */
this.props.dispatch(changeZoom([undefined, undefined]));
}
} else if (_isZoomEvent(d3event)) {
this.props.dispatch(changeZoom(this.zoomCoordinates));
}
};

/* ZoomEvent is emitted by d3-zoom when shift/option + mouseWheel on the entropy panel. */
function _isZoomEvent(d3Event) {
return d3Event && d3Event.sourceEvent && d3Event.sourceEvent.type === 'zoom';
}

/* zooms in by modifing the domain of xMain scale */
this._zoom = function _zoom(start, end) {
const s = [start, end];
Expand Down

0 comments on commit f0d4d59

Please sign in to comment.