-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Multi-axis Shapes #7666
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
base: master
Are you sure you want to change the base?
Multi-axis Shapes #7666
Changes from 1 commit
c8be45f
a7b3bb2
ace820b
a910d42
4d70fd3
d3208e9
e5a71ad
4a571aa
5f7eedf
777cded
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,6 +53,25 @@ exports.extractPathCoords = function(path, paramsToUse, isRaw) { | |
| return extractedCoordinates; | ||
| }; | ||
|
|
||
| exports.countDefiningCoords = function(path, isNotPath) { | ||
| // non-path shapes always have 2 defining coordinates | ||
| if(isNotPath) return 2; | ||
| if(!path) return 0; | ||
|
|
||
| var segments = path.match(constants.segmentRE); | ||
| if(!segments) return 0; | ||
|
|
||
| var coordCount = 0; | ||
| segments.forEach(function(segment) { | ||
| // for each path command, check if there is a drawn coordinate | ||
| var segmentType = segment.charAt(0); | ||
| var hasDrawnX = constants.paramIsX[segmentType].drawn !== undefined; | ||
| var hasDrawnY = constants.paramIsY[segmentType].drawn !== undefined; | ||
| if(hasDrawnX || hasDrawnY) coordCount++; | ||
|
||
| }); | ||
| return coordCount; | ||
alexshoe marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }; | ||
|
|
||
| exports.getDataToPixel = function(gd, axis, shift, isVertical, refType) { | ||
| var gs = gd._fullLayout._size; | ||
| var dataToPixel; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.