Switch between 'Expand to Fill' and 'Shrink to Fit' with code


For a responsive project i wonder if i can change some element properties with javascript within a same layout.
Why ? i want to use a portrait & paysage 2 layouts system (it works already), which then adapts the scaling behavior of some elements depending of the window width.

For example switch a group in the timeline between ‘Expand to Fill’ and ‘Shrink to Fit’ with code ?
Is it possible ?

… no method to change this on runtime.


. different layouts using different reponsive settings on elements

. don’t use reponsive settings but hypes setter-API to scale elements

1 Like

Thank you ! I’m curious, I will investigate this hypes setter-API.
Meanwhile i found a workaround for my project.

  • Made 2 symbols with all the screen elements (one for portrait, one landscape) for portrait & landscape layouts.
  • Added 2 more layouts : ‘portrait_large’ and ‘landscape_large’
  • Changed the symbols ‘expand’ and ‘shrink’ stuff in each layout.
  • With the symbols, its almost like having 2 layouts to manage only.