I build this website (http://thesupersustainables.com/beta/#activ) and I’d like to see if there is a way to have the height adjust automatically in this activities section once the effect pops on on the desktop version only. This is the link for the Hype item I created (https://www.dropbox.com/s/xa0whox8lua46k6/activities-2.zip?dl=0)
There’s no built-in way to dynamically change the size of a scene. You could potentially do this manually with code, but I’m not sure how much it will interfere with the flexible layout/responsive layout system. This is a sample; use at your own risk:
var newHeight = "600px";
var docElement = document.getElementById(hypeDocument.documentId());
docElement.style.height = newHeight;
var scenes = docElement.getElementsByClassName("HYPE_scene");
for(var i = 0; i < scenes.length; i++) {
if(scenes[i].style.display != "none") {
scenes[i].style.height = newHeight;
}
}
1 Like
Thanks Jonathan. I should remove this. My mistake was checking “Scale” on height within Scene Size of Scene. After I unchecked it the extra margin under the artwork went away.
Glad you figured it out!
1 Like