Welcome to %s forums

BrainModular Users Forum

Login Register

Using position y and heightpc to auto position patch windows

I need help on a Patch
Post Reply
ahonoe
Member
Posts: 161
Location: Toronto
Contact:

Unread post by ahonoe » 18 Dec 2014, 01:41

Hi Gang,

I'm trying to set things up so that my patch windows will dynamically reposition themselves based on the sizes and positions of other patches in the same rack. I'm feeding the sum of each rack's "position y" and "heightpc" params into the "position y" propery input of the next patch but patch windows overlap (see img).

Image

Suggestions would be appreciated.
Regards,

Scott

shawnb
Member
Posts: 190
Location: San Francisco
Contact:

Unread post by shawnb » 19 Dec 2014, 05:21

I ran into the same thing. Sorry can't help.

I just experimented a lot with adding offsets until it worked...
Address the process rather than the outcome. Then, the outcome becomes more likely. - Fripp

ahonoe
Member
Posts: 161
Location: Toronto
Contact:

Unread post by ahonoe » 19 Dec 2014, 05:30

Thanks Shawn. I passed it along to Olivier to see if it's a bug, or a lack of understanding on my part.

I figured out a workaround using the height & top properties. This works as expected.
Regards,

Scott

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 24 Dec 2014, 15:03

the width/height/x,y relatives positions can be approximative because the result depends on the height/width of objects.

something like

x(%) = pos x of the object (pixel) / (width of container (pixel) - width of the object(pixel))

so the x(%) gives good results in the particular case of width=0

same idea for y(%)

So in your case use (absolutes) pixels positions

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests