in public/components/Charts/Highlight/Highlight.js [120:140]
_clickedOutsideDrag(xLoc, yLoc) {
const { enableX, enableY, marginLeft, marginTop } = this.props;
const {
dragArea,
brushArea: { left, right, top, bottom },
} = this.state;
const actualXLoc = xLoc + marginLeft;
const actualYLoc = yLoc + marginTop;
const clickedOutsideDragX = dragArea && (actualXLoc < left || actualXLoc > right);
const clickedOutsideDragY = dragArea && (actualYLoc < top || actualYLoc > bottom);
if (enableX && enableY) {
return clickedOutsideDragX || clickedOutsideDragY;
}
if (enableX) {
return clickedOutsideDragX;
}
if (enableY) {
return clickedOutsideDragY;
}
return true;
}