Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixed default coordinates bug in fromHTML #278

Merged
merged 1 commit into from Jun 25, 2014

Conversation

Projects
None yet
2 participants
Contributor

rustamli commented Jun 8, 2014

It seems there was no way to set starting coordinates to 0 using fromHTML method,

When you specified x = 0 or y = 0, they defaulted to 4.

This was caused by following snippet from jspdf.plugin.from_html.js:

jsPDFAPI.fromHTML = function (HTML, x, y, settings, callback, margins) {
    // ...
    return process(this, HTML, x || 4, y || 4, settings, callback);
}

Now they default to 4, only in case when their values are undefined.

Collaborator

diegocr commented Jun 25, 2014

Apparently i wrongly assumed nobody would want to use a 0 coordinate... well, thanks.

diegocr added a commit that referenced this pull request Jun 25, 2014

Merge pull request #278 from rustamli/master
Fixed default coordinates bug in fromHTML

@diegocr diegocr merged commit afe80e3 into MrRio:master Jun 25, 2014

diegocr added a commit that referenced this pull request Jun 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment