Skip to content

Commit

Permalink
Removed 'px' replace on parseInt (not needed), plus did a build
Browse files Browse the repository at this point in the history
  • Loading branch information
superelement committed Oct 16, 2019
1 parent 16b486c commit c32bdc7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion js/iframeResizer.contentWindow.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions js/iframeResizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@
}

function getPaddingEnds(compStyle) {

if (compStyle.boxSizing !== 'border-box') {
return 0;
}
Expand All @@ -181,8 +180,8 @@
if (compStyle.boxSizing !== 'border-box') {
return 0;
}
var top = compStyle.borderTopWidth && compStyle.borderTopWidth.indexOf('px') !== -1 ? parseInt(compStyle.borderTopWidth.replace('px', ''), 10) : 0
var bot = compStyle.borderBottomWidth && compStyle.borderBottomWidth.indexOf('px') !== -1 ? parseInt(compStyle.borderBottomWidth.replace('px', ''), 10) : 0
var top = compStyle.borderTopWidth ? parseInt(compStyle.borderTopWidth, 10) : 0
var bot = compStyle.borderBottomWidth ? parseInt(compStyle.borderBottomWidth, 10) : 0
return top + bot
}

Expand Down
2 changes: 1 addition & 1 deletion js/iframeResizer.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/iframeResizer.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/iframeResizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,17 @@
if (compStyle.boxSizing !== 'border-box') {
return 0;
}
var top = compStyle.paddingTop ? parseInt(compStyle.paddingTop.replace('px', ''), 10) : 0
var bot = compStyle.paddingBottom ? parseInt(compStyle.paddingBottom.replace('px', ''), 10) : 0
var top = compStyle.paddingTop ? parseInt(compStyle.paddingTop, 10) : 0
var bot = compStyle.paddingBottom ? parseInt(compStyle.paddingBottom, 10) : 0
return top + bot
}

function getBorderEnds(compStyle) {
if (compStyle.boxSizing !== 'border-box') {
return 0;
}
var top = compStyle.borderTopWidth ? parseInt(compStyle.borderTopWidth.replace('px', ''), 10) : 0
var bot = compStyle.borderBottomWidth ? parseInt(compStyle.borderBottomWidth.replace('px', ''), 10) : 0
var top = compStyle.borderTopWidth ? parseInt(compStyle.borderTopWidth, 10) : 0
var bot = compStyle.borderBottomWidth ? parseInt(compStyle.borderBottomWidth, 10) : 0
return top + bot
}

Expand Down

0 comments on commit c32bdc7

Please sign in to comment.