Unsolved Viewport starts all the way down
-
Hi there, I have a viewport with a few sliders and buttons in my plugin and every time I open the panel where the viewport is located, it is scrolled all the way down. Actually, it should start at the top and not from bottom to top.
I don't use a script its only the Panel and a Viewport inside
-
-
@treynterrio Check the viewport's
viewPositionY
property -
@d-healey I tried this:
inline function onViewport1Control(component, value) { Viewport1.viewPositionY = 0; }; Content.getComponent("Viewport1").setControlCallback(onViewport1Control);
but it still starts on the bottom
-
@treynterrio try it in the call back that is doing this:
"every time I open the panel where the viewport is"
-
@treynterrio said in Viewport starts all the way down:
Viewport1.viewPositionY = 0;
That is not valid code.
Take a look in the interface designer property editor, is the
viewPositionY
set to 0? -
@d-healey yes its on 0
-
@treynterrio Can you share a snippet that demonstrates the issue?
-
@d-healey I think I've to send the whole project then I just seen that the Y is now on 1 all the time before I pasted in the code above it was on 0 the whole time
-
Search your script for
viewPositionY
and see if you are setting it somewhere. -
@d-healey its nowhere in my script the viewport is 500x100 and the panel inside is 490x200 I don't know If this problem was there before
-
@treynterrio Make a new minimal project that demonstrates the issue and post the snippet here
-
@d-healey the problem is gone as soon as I choose a preset from the preset browser. Is there a way to choose one straight? I tried the default user preset in settings but this doesn't work. My default is preset is already - Default but I've to click on the next preset button to choose it
-
@treynterrio Without seeing your code I can't give a useful answer as I don't know what the cause of the issue is.