8000 Fix scatterternary lasso/select drag modes by etpinard · Pull Request #1831 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Fix scatterternary lasso/select drag modes #1831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers 8000 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 5 commits into from
Jun 28, 2017
Merged
Changes from 1 commit
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
Next Next commit
rename variable plot to more appropriate zoomLayer
- a follow-up to #448
  • Loading branch information
etpinard committed Jun 28, 2017
commit 14ae77cafa0069683cba00ee597e28814e1e2151
6 changes: 3 additions & 3 deletions src/plots/cartesian/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var MINSELECT = constants.MINSELECT;
function getAxId(ax) { return ax._id; }

module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
var plot = dragOptions.gd._fullLayout._zoomlayer,
var zoomLayer = dragOptions.gd._fullLayout._zoomlayer,
dragBBox = dragOptions.element.getBoundingClientRect(),
xs = dragOptions.plotinfo.xaxis._offset,
ys = dragOptions.plotinfo.yaxis._offset,
Expand All @@ -43,15 +43,15 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
pts = filteredPolygon([[x0, y0]], constants.BENDPX);
}

var outlines = plot.selectAll('path.select-outline').data([1, 2]);
var outlines = zoomLayer.selectAll('path.select-outline').data([1, 2]);

outlines.enter()
.append('path')
.attr('class', function(d) { return 'select-outline select-outline-' + d; })
.attr('transform', 'translate(' + xs + ', ' + ys + ')')
.attr('d', path0 + 'Z');

var corners = plot.append('path')
var corners = zoomLayer.append('path')
.attr('class', 'zoombox-corners')
.style({
fill: color.background,
Expand Down
0