-
Couldn't load subscription status.
- Fork 0
Support gradients for slide background #2
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
Conversation
ef6f809 to
0be6690
Compare
| * @returns XML string | ||
| */ | ||
| function createGradientElements(gradient: Gradient, internalElements: string): string { | ||
| let strXml = '', |
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.
Very imperative code here, but consistent with the style used in the project, see createGlowElement above
0be6690 to
66f18bf
Compare
| stops = gradient.stops | ||
|
|
||
| if (!isGradient(gradient)) { | ||
| console.warn(`This is not a valid gradient:`, gradient) |
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.
This is handled similar to colors.
When no valid color is found, we log a warning in the console, and use a default color.
See createColorElement fn.
66f18bf to
1b743fb
Compare
|
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'express' imported from /home/sam/Code/repos/PptxGenJS/demos/browser_server.mjs
at new NodeError (internal/errors.js:322:7)
at packageResolve (internal/modules/esm/resolve.js:732:9)
at moduleResolve (internal/modules/esm/resolve.js:773:18)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:887:11)
at Loader.resolve (internal/modules/esm/loader.js:89:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:76:40)
at link (internal/modules/esm/module_job.js:75:36) {
code: 'ERR_MODULE_NOT_FOUND'
} |
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.
looks great!
Interesting that all the compiled code is not in .gitignore
|
@tjinauyeung can we make a plan for attempting to merge changes to upstream?
|

Adds gradient support for slide backgrounds.
Usage
How to test
cd ./demosnpm inode ./browser_server.mjshttp://localhost:8000/browser/index.htmlin the browser