-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Replace _has<PlotType> variables with '_has()' fullLayout method #491
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
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
88f552a
mv gd._modules -> fullLayout._modules
etpinard 525e3c7
lint
etpinard 876ce4b
attach has (plot type) method to fullLayout,
etpinard f45ffec
add tempory block _has() -> _hasCartesian etc.
etpinard 4e0c6da
rm _has??? attributes
etpinard 93493a6
make 'pie' a layout category,
etpinard e63ba4a
check for hasCartesian && !hasPie for 'hovermode',
etpinard b655cb0
Revert "check for hasCartesian && !hasPie for 'hovermode',"
etpinard f476e05
split pie trace base plot module from cartesian:
etpinard 1c41c2e
rm (now useless) trace module layoutCategories
etpinard 313150e
add fill unique lib function,
etpinard 392619c
fill fullLayout._basePlotModules list in default trace loop,
etpinard 3787d47
loop over basePlotModules instead of subplotRegistry in:
etpinard 68b12c4
make sure to add cartesian base plot module to orphan axis graphs:
etpinard a41427c
move 3d axes init step from makePlotFrameork -> Gl3d.plot
etpinard a48d071
check for non-cartesian/pie/ternary base plot module in restyle,
etpinard a78521c
handle a few polar-only cases:
etpinard aa2ec8b
sub has??? -> has('???')
etpinard 77fb7e2
loop over (trace) modules in trace supplyLayoutDefaults:
etpinard a141d78
robustify pie clean step:
etpinard dc297ca
put ref of hasPlotType method on Plots:
etpinard e3f72f0
move block of _has?? = _has('') after all defaults are filled:
etpinard c59a960
update tests
etpinard 9f94494
add info about data/layout and fullData/fullLayout
etpinard 9837d8b
Merge branch 'master' into has-plot-type
etpinard 0c7b2f8
rename Lib.fillUnique -> Lib.pushUnique
etpinard 5e6759b
rm unnecessary boolean type coercion
etpinard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { | |
// if gl3d or geo is present on graph. This is retain backward compatible. | ||
// | ||
// TODO drop this in version 2.0 | ||
var ignoreOrphan = (layoutOut._hasGL3D || layoutOut._hasGeo); | ||
var ignoreOrphan = (layoutOut._has('gl3d') || layoutOut._has('geo')); | ||
|
||
if(!ignoreOrphan) { | ||
for(i = 0; i < layoutKeys.length; i++) { | ||
|
@@ -95,7 +95,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) { | |
// make sure that plots with orphan cartesian axes | ||
// are considered 'cartesian' | ||
if(xaListCartesian.length && yaListCartesian.length) { | ||
layoutOut._hasCartesian = true; | ||
Lib.pushUnique(layoutOut._basePlotModules, Plots.subplotsRegistry.cartesian); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Important ⏫ |
||
} | ||
|
||
function axSort(a, b) { | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
In
restyle
, which is more general thanin an effort to support custom
basePlotModules