Skip to content

Commit

Permalink
Add px unit to iframe height
Browse files Browse the repository at this point in the history
  • Loading branch information
devChuk committed Oct 4, 2017
1 parent 5a42c59 commit d471431
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ export default function websiteIframe ($compile, $sce, $timeout) {
'class': 'website-iframe',
'id': 'iframe-' + $scope.id,
'frameBorder': 0,
'height': $scope.height || 400
'height': $scope.height || '400px'
}
for (var attr in iframeAttrs) {
iframe.setAttribute(attr, iframeAttrs[attr])
}

var iframeWrapper = document.getElementById('iframe-wrapper-' + $scope.id).parentElement
iframeWrapper.style.height = $scope.height || 400
iframeWrapper.style.height = $scope.height || '400px'

var parent = document.getElementById('iframe-wrapper-' + $scope.id)
parent.appendChild(iframe)
Expand Down

0 comments on commit d471431

Please sign in to comment.