Skip to content

Commit

Permalink
feat: calc header height
Browse files Browse the repository at this point in the history
  • Loading branch information
Antipkin-A committed Feb 26, 2024
1 parent 53cacba commit 027339e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,11 +706,12 @@
return;
}

var headerHeight = $("#header").length > 0 ? $("#header").height() : 50;
var wrapEl = $("#app>iframe");
if (wrapEl.length > 0) {
wrapEl[0].style.height = (screen.availHeight - 50) + "px";
wrapEl[0].style.height = (screen.availHeight - headerHeight) + "px";
window.scrollTo(0, -1);
wrapEl[0].style.height = (window.innerHeight - 50) + "px";
wrapEl[0].style.height = (window.innerHeight - headerHeight) + "px";
}
};

Expand Down

0 comments on commit 027339e

Please sign in to comment.