Skip to content
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

fix #2938: textWithLink -> link centered correctly #3026

Merged
merged 9 commits into from Dec 22, 2020
3 changes: 2 additions & 1 deletion src/modules/annotations.js
Expand Up @@ -363,7 +363,8 @@ import { jsPDF } from "../jspdf.js";
//TODO We really need the text baseline height to do this correctly.
// Or ability to draw text on top, bottom, center, or baseline.
y += height * 0.2;
this.link(x, y - height, width, height, options);
x += width * 0.5;
this.link(x - width, y - height, width, height, options);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should do this conditionally depending on the options.align and options.maxWidth properties.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @HackbrettXXX I guess you are right, checked it based on align condition. But due to some reason build got interrupted and ci throws error. Can you do a re-run or help me out on that part.

image

return width;
};

Expand Down