API: correct or meaningful properties in responsive layout?

responsive_doc_el_alignment.hype.zip (13.1 KB)

setup:
responsive layout with three elements on the same left position, but different alignments.

issue:
get left Property via the API returns the same values for all of those elements, but obviously, in conjunction with the available size, the values are not the same.

so for example setting a same a left-property to those elements via Hypes API will result in three different positions …

request:
a meaningful response via the API-methods or at least a kind of factor as argument that takes care for the alignment-settings.

2 Likes

Thanks for the request.

For right now, you will want to use element.getBoundingClientRect() instead. The setElementProperty() API requires items to be in pre-flexible layout coordinates though.

hi @jonathan,

works as getter, but animating those three elements in the example above to the same left position using HYPES API … couldn’t HYPES getter return an additional factor that considers relationship to a left/top alignment¿

2 Likes

(I was mainly pointing that out for other folks reading that might still want solely a getter!)