You are not logged in.

1

Tuesday, January 24th 2023, 11:24pm

Help pls

Hi, I'm here for the first time, help me find a solution to the problem
There is layer[img] and layer[imgBg]. Imgbg is the background of img
The problem is, when you resize the screen, you need Img to stay in the background and be resized with it.



if (layer[img].pixelheight GE layer[img].pixelwidth AND layer[imgBg].height GE layer[imgBg].width /* If the plan is vertical And the background is vertical */,
calc(layer[img].width, stagewidth - (settings.marginimg * 4 + stagewidth) * layer[img].scaleMp);
set(layer[img].height, 'prop');
, layer[img].pixelheight LE layer[img].pixelwidth AND layer[imgBg].height LE layer[imgBg].width /* If the plan is horizontal And the background is horizontal */,
calc(layer[img].width, stagewidth - (settings.marginimg * 4 + stagewidth) * layer[img].scaleMp);
set(layer[img].height, 'prop');
, layer[img].pixelheight GE layer[img].pixelwidth AND layer[imgBg].height LE layer[imgBg].width /* If the plan is vertical And the background is horizontal */,
calc(layer[img].height, stageheight - (settings.marginimg * 4 + stageheight) * layer[img].scaleMp);
set(layer[img].width, 'prop');
, layer[img].pixelheight LE layer[img].pixelwidth AND layer[imgBg].height GE layer[imgBg].width /* If the plan is horizontal And the background is vertical */,
calc(layer[img].width, stagewidth - (settings.marginimg * 4 + stagewidth) * layer[img].scaleMp);
set(layer[img].height, 'prop');
);[/img]

2

Wednesday, January 25th 2023, 9:14am

hi, welcome... but its not understandable what you want to do
can you explain better what to resize to what ? plz share the code of the layers
normally you would simply use a width / height of 100%

also..
i think it is not intended to use uppercase letters in names or attributes...
its best not to do that.

ps. there is also the code (#) button to share code