-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[editor] Use the fit-curve
package (issue 15004)
#15142
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
Rather than including all of this external code in the PDF.js repository, we should be using the npm package instead. Unfortunately this is slightly more complicated than you'd hope, since the `fit-curve` package (which is older) isn't directly compatible with modern JavaScript modules. In particular, the following cases needed to be considered: - For the development viewer (i.e. `gulp server`) and the unit-tests, we thus need to build a fitCurve-bundle that can be directly `import`ed. - For the actual PDF.js build-targets, we can slightly reduce the sizes by depending on the "raw" `fit-curve` source-code. - For the Node.js unit-tests, the `fit-curve` package can be used as-is.
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/94bafc0854d0b97/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/94bafc0854d0b97/output.txt Total script time: 2.71 mins Published |
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/a5097f73fd2737c/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/6245336fd11487c/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/a5097f73fd2737c/output.txt Total script time: 25.77 mins
Image differences available at: http://54.241.84.105:8877/a5097f73fd2737c/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/6245336fd11487c/output.txt Total script time: 29.16 mins
Image differences available at: http://54.193.163.58:8877/6245336fd11487c/reftest-analyzer.html#web=eq.log |
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 tested in local dev environment and with a local build of Firefox and in both cases, it works well.
Thank you.
Would you mind to file a bug upstream in order to modernize the package ? |
Yes, it's already on my TODO list :-) |
Rather than including all of this external code in the PDF.js repository, we should be using the npm package instead.
Unfortunately this is slightly more complicated than you'd hope, since the
fit-curve
package (which is older) isn't directly compatible with modern JavaScript modules.In particular, the following cases needed to be considered:
gulp server
) and the unit-tests, we thus need to build a fitCurve-bundle that can be directlyimport
ed.fit-curve
source-code.fit-curve
package can be used as-is.