-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add config options in plot schema #3376
Conversation
- which match the current "default", but will make scrollZoom:false disable zoom for all subplots!
... @archmoj would you mind taking a look at this one at some point this week? |
This one is also interesting to review. Thanks @etpinard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR.
I was wondering it may be useful for the users to have the plotly.js version written in the plot-schema.json
.
Thanks @etpinard.
|
||
queueLength: { | ||
valType: 'integer', | ||
min: 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be useful to have a max
for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the Queue
logic has no limit to the number of items.
You're right though, there should probably be a max
, but as this is deprecated code, I'll pass.
].join(' ') | ||
}, | ||
|
||
scrollZoom: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may apply the changes to this attribute from other PR #3422:
plotly.js/src/plot_api/plot_config.js
Lines 147 to 159 in 16a01e7
scrollZoom: { | |
valType: 'flaglist', | |
flags: ['cartesian', 'gl3d', 'geo', 'mapbox'], | |
extras: [true, false], | |
dflt: 'gl3d+geo+mapbox', | |
description: [ | |
'Determines whether mouse wheel or two-finger scroll zooms is enable.', | |
'Turned on by default for gl3d, geo and mapbox subplots', | |
'(as these subplot types do not have zoombox via pan),', | |
'but turned off by default for cartesian subplots.', | |
'Set `scrollZoom` to *false* to disable scrolling for all subplots.' | |
].join(' ') | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'm planning on merging #3422 into this PR.
Make scrollZoom config option a flaglist
got a in-person 💃 from @archmoj - merging! |
resolves #2703
Unlike #1188, this PR doesn't try to make the config options (or attributes?) compatible with
Lib.coerce
. Instead, this PR just listsvalType
anddescription
fields for all the config options and formats them into the schema. Here, the default config "object" stays the same, hence there's no breakage in the behaviour.Go to https://22282-45646037-gh.circle-artifacts.com/0/plot-schema.json and
<ctrl-f>
for"config":
to see the results.cc @plotly/plotly_js