ViewPort view position y
-
Hello to all :-)
Is
viewport.set("viewPositionY", value);
not working on Init? Even if I set the Y position on Init it always scrolls down a little bit after I hit compile.Thank you
Oli -
@Oli-Ullmann Yes there is a known problem with setting the viewPositions
https://forum.hise.audio/topic/11852/viewport-problems?_=1739958949137 -
@ulrik
Oh no! :-(
Thank you for the info. -
@Oli-Ullmann Okay here is a cheeky solution to the problem.
Inside the viewport put a panel to act like a container, then set the x/y position of the panel to whatever you desire. Once you recompile, the viewport will start from the top.
const var Viewport1 = Content.getComponent("Viewport1"); Viewport1.set("viewPositionY", 0.00); // Doesn't work const var ContainerPanel = Content.getComponent("ContainerPanel"); ContainerPanel.set("x", 0); ContainerPanel.set("y", 0);