Skip to content

Bug fix parcoords - selecting lines outside displayed range axis #4087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/traces/parcoords/axisbrush.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,6 @@ function attachDragBehavior(selection) {
s.newExtent = [s.startExtent, d.unitToPaddedPx.invert(y)].sort(sortAsc);
}

// take care of the parcoords axis height constraint: bar can't breach it
var bottomViolation = Math.max(0, -s.newExtent[0]);
var topViolation = Math.max(0, s.newExtent[1] - 1);
s.newExtent[0] += bottomViolation;
s.newExtent[1] -= topViolation;

d.brush.filterSpecified = true;
s.extent = s.stayingIntervals.concat([s.newExtent]);
s.brushCallback(d);
Expand Down
6 changes: 4 additions & 2 deletions src/traces/parcoords/lines.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,11 @@ function makeItem(model, leftmost, rightmost, itemNumber, i0, i1, x, y, panelSiz

function expandedPixelRange(bounds) {
var dh = maskHeight - 1;
var a = Math.max(0, Math.floor(bounds[0] * dh), 0);
var b = Math.min(dh, Math.ceil(bounds[1] * dh), dh);
return [
Math.max(0, Math.floor(bounds[0] * dh), 0),
Math.min(dh, Math.ceil(bounds[1] * dh), dh)
Math.min(a, b),
Math.max(a, b)
];
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading