-
-
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
Clean subplots #2227
Merged
Merged
Clean subplots #2227
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
687a2e2
refactor calcdata filtering
alexcjohnson 9a18062
perf xaCheater/xaNonCheater test in cartesian axes defaults
alexcjohnson 2c9d90f
lint cartesian layout_defaults
alexcjohnson 3625be4
rework subplot logic - create subplots from traces and components only
alexcjohnson 2de217e
update baselines for improved subplot logic
alexcjohnson b94ad8e
wider acceptance range for png toimage test
alexcjohnson c88e8c2
update trans keys
alexcjohnson 26aaffc
fix typo in cameraposition -> camera cleaning
alexcjohnson 276d1d3
updated gl3d "cameraposition" baselines
alexcjohnson c49007e
:hocho: unused import
alexcjohnson 698561c
:hocho: commented out code
alexcjohnson 8804311
Object.keys -> for in, in plots/plots
alexcjohnson 4786b6e
simplify redundant title removal
alexcjohnson 6e62b35
get rid of unneeded _has(gl2d)
alexcjohnson 0506f88
use _subplots in Axes.list/listIds
alexcjohnson 2aa1545
simplify and speed up a few Axes.list uses
alexcjohnson 44060db
fix annotation calc_autorange change
alexcjohnson 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 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 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 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 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 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -858,3 +858,29 @@ lib.templateString = function(string, obj) { | |
return getterCache[key]() || ''; | ||
}); | ||
}; | ||
|
||
/* | ||
* alphanumeric string sort, tailored for subplot IDs like scene2, scene10, x10y13 etc | ||
*/ | ||
var char0 = 48; | ||
var char9 = 57; | ||
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. brilliant ✨ |
||
lib.subplotSort = function(a, b) { | ||
var l = Math.min(a.length, b.length) + 1; | ||
var numA = 0; | ||
var numB = 0; | ||
for(var i = 0; i < l; i++) { | ||
var charA = a.charCodeAt(i) || 0; | ||
var charB = b.charCodeAt(i) || 0; | ||
var isNumA = charA >= char0 && charA <= char9; | ||
var isNumB = charB >= char0 && charB <= char9; | ||
|
||
if(isNumA) numA = 10 * numA + charA - char0; | ||
if(isNumB) numB = 10 * numB + charB - char0; | ||
|
||
if(!isNumA || !isNumB) { | ||
if(numA !== numB) return numA - numB; | ||
if(charA !== charB) return charA - charB; | ||
} | ||
} | ||
return numB - numA; | ||
}; |
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.
Does this fix #970 ?
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.
or maybe #1396
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.
I don't think it fixes #970 but yes, it does fix #1396 🎉