Skip to content

Conversation

MarceloZapatta
Copy link
Contributor

This PR will fix the #2801.
Writes the links with calculated final bounds on link function.

@HackbrettXXX
Copy link
Collaborator

@MarceloZapatta
Copy link
Contributor Author

@HackbrettXXX I dont have too much knowledge in tests, but i tried to write one. I created a reference file to compare when the link is written wrong, but it only passes on Chrome / Firefox.
But manually testing on sauselabs on Internet Explorer it works has is expected. So if I get the file result of IE, it fails in reverse way, passes on IE but fails in Chrome / Firefox.

Looks like the fails is not related with the previous issue.

Not sure how to write this test to compare the PDF only for the position of the link, can you help me?

@HackbrettXXX
Copy link
Collaborator

Thanks for adding a test case. The issue seems to be small floating point differences. In order to fix this you can add the floatPrecision: 2 option to the jsPDF constructor.

@MarceloZapatta
Copy link
Contributor Author

@HackbrettXXX Thanks for the tip! It worked like a charm.

Fixed the unit test, also moved into annotations.spec.js that make more sense.

@HackbrettXXX HackbrettXXX merged commit c964480 into parallax:master Oct 7, 2020
@HackbrettXXX
Copy link
Collaborator

Thanks :)

This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants