let_Maya Napisano Grudzień 8, 2021 Zgłoś Napisano Grudzień 8, 2021 (edytowany) I am working on replacing this jQuery code written in Typescript into Vanilla JavaScript for edit .pdf purposes. I have problem resizing the window. Replacing .outerHeight() with offsetHeight doesn't work windowResizeHandler: () => void = () => { let body = document.querySelector("body"); let height = parseInt(window.getComputedStyle(body).height); //suppose there is a #header element which takes some area. let headHeight = $("#header").outerHeight(); let rightHeight = height; if ($("#header").is(":visible")) { rightHeight = height - headHeight; } $("#right").height(rightHeight); WebPDF.updateLayer(); HTML <page-container> <div id="docViewer" ref="docViewer" style="background: #dddedf;"></div> </page-container> Edytowano Grudzień 8, 2021 przez let_Maya Cytuj
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.