How to set the height of a shape to be the high of its container group?

Hi,

I have group X and inside group X, there is shape A.

I want shape A’s height to be dynamically adjusted to group X’s height.

How can I set the height of shape A to be equal to the height of group X at all times?

Thanks!

Under Appearance, set it’s height to be “fixed”, then enter a value of 100 and in the dropdown next to it (which is defaulted to “px”), change it to “%”. Now the image’s height will always be 100% of it’s container.

1 Like

Unfortunately, I am not using the new responsive engine yet so I don’t have that option.

If I do the change to the new responsive engine my app gets “broken”, I get 100+ errors immediately. So am planning to do it someday in the future when I have more time to fix all the errors that will appear when I do the change.

Yeah, you’re going to have to. The functionality you’re after is quite literally the definition of responsive design. :slight_smile:

1 Like

Yes, in the mean time, I am looking to probably Run every 0.1 seconds a js code like:

var parent_group_height = document.getElementById(“grouprgoriginal”).style.height;

var shape = document.getElementById(“rgoriginalshapeblock”);

shape.style.height = "parent_group_height"px;

But I am not a coder, have not been able to find a code that works :slightly_frowning_face:

Thanks for your suggestion anyways!

If anybody can help me refiine this code, it would awesome!

What if you just add some css to the shape ? Setting it’s height at 100% should work no?

Hi! Do you know what the code would look like?

This topic was automatically closed after 70 days. New replies are no longer allowed.