Viewport - set(""viewPositionY")
-
OK so I have viewport with a holding-panel inside it, that panel has a variable number of sub-panels being displayed....
So I cant get the Viewport to respond to viewport.set("viewPosition",1), except on init...
so first time thru - it sets the viewport to the end, but if I change the number of sub-panels displayed, and thus change the size of the holding-panel, then the viewport shoots back to the top and wont act on any ViewPositionY I send it as part of the holding panels repaint function...
What am I doing wrong?
-
@Lindon so it appears to be a timing issue....if I add a button to do this positionY stuff that works - so is there a listener for the viewport rejigging itself?
I cant find anything in the Broadcaster wizard that looks like it can be applied...but Im a complete novice in there...
-
@Lindon I just took a look at how I'm doing this and seems a crude timer is what I'm using
panel.setTimerCallback(function() { updateViewportPosition(this); this.stopTimer(); }); panel.startTimer(500); -
@David-Healey thanks yeah - I wonder how dependent it is upon how many sub panels I m using at any given time....
-
@Lindon are you using child panels?
-
@David-Healey child of the holder-panel - yes, a lot of them - they are all pre-declared and set up, so Im not sure they will have any effect here...hoping not anyway...
-
@Lindon I meant the dynamic child panel feature, but either should work fine
-
@David-Healey nope there are no dynamic panels any more...