Skip to content

Commit

Permalink
futurepress#942 Parsed the padding before adding as I found some book…
Browse files Browse the repository at this point in the history
…s where these values are coming in as strings appended with px like "38px"
  • Loading branch information
tarungupta-in committed Jun 5, 2019
1 parent 87f5964 commit ce81e9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rendition.js
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ class Rendition {

let computed = contents.window.getComputedStyle(contents.content, null);
let height = (contents.content.offsetHeight - (parseFloat(computed.paddingTop) + parseFloat(computed.paddingBottom))) * .95;
let horizontalPadding = computed.paddingLeft + computed.paddingRight;
let horizontalPadding = parseFloat(computed.paddingLeft) + parseFloat(computed.paddingRight);

contents.addStylesheetRules({
"img" : {
Expand Down

0 comments on commit ce81e9f

Please sign in to comment.