Skip to content
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

Layout grids #2399

Merged
merged 12 commits into from
Feb 26, 2018
2 changes: 2 additions & 0 deletions src/plots/domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ exports.attributes = function(opts, extra) {
out.row = {
valType: 'integer',
min: 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Two suggestions:

  • It might be worth adding a dflt: 0, so that domain: {column: 2} defaults to subplot xy2?
  • It might be nice to allow domain: {row: ''} to match the 'x'/'x2'/'x3' counter

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It might be worth adding a dflt: 0, so that domain: {column: 2} defaults to subplot xy2?

Yeah, makes sense - if you have a grid, by default all subplots should go in it. You can always set explicit domain.x and domain.y anyhow, this is only setting the defaults for those attributes -> 4b43e35

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It might be nice to allow domain: {row: ''} to match the 'x'/'x2'/'x3' counter

As discussed offline, I omitted this one (though if you say '' you'll get 0 now anyway with the change ^^ so the result is the same)

dflt: 0,
role: 'info',
editType: opts.editType,
description: [
Expand All @@ -90,6 +91,7 @@ exports.attributes = function(opts, extra) {
out.column = {
valType: 'integer',
min: 0,
dflt: 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Great. Can we 🔒 this down in a jasmine test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good call -> 794669b

role: 'info',
editType: opts.editType,
description: [
Expand Down