Using flexible layouts within Wordpress

Hi raph,

set a class attribute of ‘heightSizer’ to your group, then run the script on sceneload. it’ll resize the hypecontainer.

window.onload = window.onresize = function(){

var hypeContainer = document.getElementById(hypeDocument.documentId())

var currScene = document.querySelector('#'+ hypeDocument.documentId()+' > .HYPE_scene[style*="block"]');
//https://forums.tumult.com/t/extend-tumult-hype-with-javascript-hypedocument-extensions/6847/19

var heightSizer = currScene.querySelector('.heightSizer');
var requestedHeight = heightSizer.getBoundingClientRect().height;
hypeContainer.style.height = requestedHeight + 'px'
}

topics_menu.hype.zip (26.5 KB)

if you do a forumsearch you’ll find several simular requests and a bunch of different solutions …

5 Likes