10000 Multiple legend positioning and sizing fixes by etpinard · Pull Request #4160 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Multiple legend positioning and sizing fixes #4160

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 20 commits into from
Sep 23, 2019
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Lib.log when margin push are dropped
  • Loading branch information
etpinard committed Aug 30, 2019
commit 1e6862a6ce2d28b5e87bb608013d3a66c45f18d4
10 changes: 8 additions & 2 deletions src/plots/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -1820,8 +1820,14 @@ plots.autoMargin = function(gd, id, o) {

// if the item is too big, just give it enough automargin to
// make sure you can still grab it and bring it back
if(o.l + o.r > fullLayout.width * 0.5) o.l = o.r = 0;
if(o.b + o.t > fullLayout.height * 0.5) o.b = o.t = 0;
if(o.l + o.r > fullLayout.width * 0.5) {
Lib.log('Margin push', id, 'is too big in x, dropping');
o.l = o.r = 0;
}
if(o.b + o.t > fullLayout.height * 0.5) {
Lib.log('Margin push', id, 'is too big in y, dropping');
o.b = o.t = 0;
}

var xl = o.xl !== undefined ? o.xl : o.x;
var xr = o.xr !== undefined ? o.xr : o.x;
Expand Down
You can’t perform that action at this time.
0