Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.com|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 |
<events onresize="setMargin(10,10,10,10);" /> <!-- setMargin(leftmargin,topmargin,bottommargin,rightmargin); --> <action name="setMargin"> <-- calculate remaining width. stagewidth - marginleft - marginright = area width --> sub(tmp1, stagewidth, %1); sub(tmp2, tmp1, %4); set(area.width, tmp2); <!-- calculate remaining height. stageheight - margintop - marginbottom = area height --> sub(tmp3, stageheight, %2); sub(tmp4, tmp3, %3); set(area.height, tmp4); <!--move the area--> set(area.x, %1); set(area.y, %2); </action> |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 |
<events onresize="define_area_size(1008,571);" /> <action name="define_area_size"> div(halfstagewidth, stagewidth, 2); div(halfareawidth, %1, 2); sub(dest_area_x, halfstagewidth, halfareawidth); copy(area.x, dest_area_x); div(halfstageheight, stageheight, 2); div(halfareaheight, %2, 2); sub(dest_area_y, halfstageheight, halfareaheight); copy(area.y, dest_area_y); set(area.width, %1); set(area.height, %2); </action> |
You are right... it is late
Zitat
sorry if there's some faults in the code. it's late ;p
...|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 |
<events onresize="setMargin(10,10,10,10);" /> <!-- setMargin(leftmargin,topmargin,bottommargin,rightmargin); --> <action name="setMargin"> <!-- calculate remaining width. stagewidth - marginleft - marginright = area width --> sub(tmp1, stagewidth, %1); sub(tmp2, tmp1, %4); copy(area.width, tmp2); <!-- calculate remaining height. stageheight - margintop - marginbottom = area height --> sub(tmp3, stageheight, %2); sub(tmp4, tmp3, %3); copy(area.height, tmp4); <!--move the area--> set(area.x, %1); set(area.y, %2); </action> |
Benutzerinformationen überspringen
Wohnort: Netherlands
Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer
: https://pame.virtualtuur.com|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 |
<events onresize="setMargin(10,10,10,10);" /> <!-- setMargin(leftmargin,topmargin,bottommargin,rightmargin); --> <action name="setMargin"> <!-- calculate remaining width. stagewidth - marginleft - marginright = area width --> sub(tmp1, stagewidth, %1); sub(tmp2, tmp1, %4); copy(area.width, tmp2); <!-- calculate remaining height. stageheight - margintop - marginbottom = area height --> sub(tmp3, stageheight, %2); sub(tmp4, tmp3, %3); copy(area.height, tmp4); <!--move the area--> set(area.x, %1); set(area.y, %2); </action> |