Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demo/code-demo/style/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ header
}

#mainContent {
width: 90%;
width: 86.7%;
margin-left: 0.8%;
}

Expand Down Expand Up @@ -304,7 +304,7 @@ header
}

#steps-nav-bar {
width: 9%;
width: 13.3%;
font-size: 90%;
padding-right: 0.8%;
border-right: 1px solid #E5E5E5;
Expand Down
15 changes: 12 additions & 3 deletions dist/powerbi.js

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

2 changes: 1 addition & 1 deletion dist/powerbi.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/powerbi.min.js

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions src/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,18 @@ export abstract class Embed {
*/
private setIframe(isLoad: boolean): void {
if(!this.iframe) {
const iframeHtml = `<iframe style="width:100%;height:100%;" src="${this.config.embedUrl}" scrolling="no" allowfullscreen="true"></iframe>`;
this.element.innerHTML = iframeHtml;
this.iframe = <HTMLIFrameElement>this.element.childNodes[0];
var iframeContent = document.createElement("iframe");
var embedUrl = this.config.embedUrl;
iframeContent.setAttribute("style", "width:100%;height:100%;");
iframeContent.setAttribute("src", embedUrl);
iframeContent.setAttribute("scrolling", "no");
iframeContent.setAttribute("allowfullscreen", "true");
var node = this.element;
while(node.firstChild) {
node.removeChild(node.firstChild);
}
node.appendChild(iframeContent);
this.iframe = <HTMLIFrameElement>node.firstChild;
}

if(isLoad){
Expand Down