Can you set Page height based on the symbol height?

Hey Folks!

I have already checked this below page out with key input by @h_classen and @MaxZieb, but I am not sure this solves the problem I have.

https://forums.tumult.com/t/creating-a-flexible-tumult-hype-document-within-a-div-with-no-set-height/13224/49

I am looking for a way to adjust the page height based on the height of a Symbol. Key point is that the symbol scale percentage changes based on layout (e.g. 60% for iPad, 30% for mobile etc.)

My problem is that there is often a lot of empty space at the bottom of the page (after Content 2 in the file) as the Symbol shrinks itself to the size of the screen.

Is there any way to get the page height to be set based on the Symbol height (after adjusting for scaling)?

Thanks so much for your help in advance!

Page height based on Symbol height.hype.zip (23.7 KB)

1 Like

Does that answer your question? It looks like you would set a class name of 'dimensions' to the element you wish to set the boundaries of your Hype document.

I think we are getting closer because the code is definitely adjusting the page height!

However, it is not operating in a predictable way -- probably because of some errors in my implementation? I have not changed the code and am simply giving the Symbol the class "dimensions".

  1. The primary page I am working on is 768*1300. Even though the Symbol dimension extends to the blue rectangle, when I publish it, the page stops at the red rectangle. Why?

  1. If I did get it to work in my primary layout, what adjustments, would I need to make for the other layouts, which are at different scales?

HypeStageResizer - layouts and scales.hype.zip (46.0 KB)

looking at your document it seems you'd like to resize the doc based on a proportional approach scaling a symbol across layouts.

it's always the same symbol, so it won't need multiple layouts ...
HypeStageResizer - layouts and scales 3.hype.zip (20,5 KB)

3 Likes

It is perfect!!!

2 Likes