Skip to content

Conversation

rbuetzer
Copy link
Contributor

@rbuetzer rbuetzer commented Apr 6, 2016

This pull request fixes the following issue:

The current calculateCoordinates method rounds the coordinates down to the next integer. This leads to the problem, that form elements are not perfectly aligned with other elements.

Example code to reproduce:

    var doc = new jsPDF();

    var radioGroup = new RadioButton();
    radioGroup.V = "/Test";
    radioGroup.Subtype = "Form";
    doc.addField(radioGroup);

    var radioButton1 = radioGroup.createOption("Test");
    radioButton1.Rect = [50, 50, 4, 4];
    radioButton1.AS = "/Test";

    doc.rect(50, 50, 4, 4);

    doc.save('Test.pdf');

Expected behaviour: The radio button is aligned with the rectangle
Actual behaviour: The radio button overlaps the rectangle at the right and at the bottom

@MrRio MrRio merged commit b5d5339 into parallax:master Apr 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants