Skip to content

Make dragmode 'lasso' & 'select' work with fixedrange axes #728

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 6 commits into from
Jul 8, 2016

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Jul 8, 2016

fixes #657

Previously, we made the main dragbox inactive whenever both xaxis and yaxis were fixedrange: true regardless of the dragmode. This is of course correct for dragmode 'pan' and 'lasso' but wrong for 'lasso' and 'select'. This PR fixes the latter two cases. In addition, this PR cleans up some modebar -> relayout code paths.

@etpinard etpinard added bug something broken status: reviewable labels Jul 8, 2016
@@ -2429,6 +2429,9 @@ Plotly.relayout = function relayout(gd, astr, val) {
var subplotIds;
manageModeBar(gd);

Plotly.Fx.supplyLayoutDefaults(gd.layout, fullLayout, gd._fullData);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Why is this in the domodebar block?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

domodebar (i.e. when only the dragmode or the hovermode changes) by-passes a bunch of things. So instead of running the whole Plots.supplyDefaults it only need to call the Fx defaults step and re-initialise the drag boxes.

@mdtusz
Copy link
Contributor

mdtusz commented Jul 8, 2016

💃

@etpinard etpinard merged commit 0dc3613 into master Jul 8, 2016
@etpinard etpinard deleted the robust-dragbox-fixedrange branch July 8, 2016 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

box and lasso select are disabled when both x and y axis have fixedrange set to true
2 participants