-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Implement axis.layer
with 'above traces' and 'below traces' values
#1871
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
Changes from all commits
7b62b73
02b9fbc
1c85de6
e44aa4d
e84701f
e234827
6f494c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
var path = require('path'); | ||
var transformTools = require('browserify-transform-tools'); | ||
var constants = require('./constants'); | ||
|
||
var pathToStrictD3Module = path.join( | ||
constants.pathToImageTest, | ||
'strict-d3.js' | ||
); | ||
|
||
/** | ||
* Transform `require('d3')` expressions to `require(/path/to/strict-d3.js)` | ||
*/ | ||
|
||
module.exports = transformTools.makeRequireTransform('requireTransform', | ||
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. @alexcjohnson I hope you don't mind this commit too much. This made incorporating Companion 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. yeah, looks great! |
||
{ evaluateArguments: true, jsFilesOnly: true }, | ||
function(args, opts, cb) { | ||
var pathIn = args[0]; | ||
var pathOut; | ||
|
||
if(pathIn === 'd3' && opts.file !== pathToStrictD3Module) { | ||
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. I gather this is so that strict-d3 itself can still get the original d3? 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. Bingo. 🎲 |
||
pathOut = 'require(\'' + pathToStrictD3Module + '\')'; | ||
} | ||
|
||
if(pathOut) return cb(null, pathOut); | ||
else return cb(); | ||
}); |
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.
See https://codepen.io/etpinard/pen/eRbxrp?editors=1010 for more info on this topic.