Window problem

Hello, my problem is related to ZIM.Window.
There are approximately 35 boxes. Texts in the box.
The boxes are in a container and this container is attached to the window. The texts in the boxes are voiced out one by one. While the texts are being spoken, window.scrollY scrolls automatically as they move to the bottom line.
Actually ask until you get to the end. When I want to scroll to the beginning of the window when it reaches the end, the boxes in the window do not appear.
The value window.scrollY=0 does not work.

There is a video of the problem I am experiencing at this link.

@Ferudun Is there a stage update issue going on?? Can you share the ZIM code or the address to the app?

@pettis Firstly, thank you for your reply. My code is complex. Let me add the section where I added windows.
My guess is that it's not related to the code. Because sometimes when I drag the scrollbar quickly, the boxes in the window do not appear.

var window = new Window({
borderColor: "rgba(0,0,0,.1)",
width: 1200,
//width: 800,
height: 550,
scrollBarDrag: true,
padding: 30,


    window.scrollBar.alpha = 1;
    window.scrollBar.color = white;
    window.scrollBar.size = 25;
    window.add({obj:hecelerCont,replace:false });
function timeUpdate(){





            ///////////// Here is the time function created with requestFrame. 
            ////As time progresses, it moves to the lower lines. 
            ///When it comes last, I want it to be window.scroolY=140. But this time the content does not appear.






When you fast drag here, the content does not appear. Then it appears while dragging again. I think there is a bug with ZIM.Window or ZIM.List.

How can I completely remove the window and add it again? stage.removeChild(window)

This doesn't work for me. It seems like its previous features remain.

@Ferudun - just back from vacation... did not read all of this and need to step out for chores... but if things are not showing in Window or List when dragging fast, could be related to the optimize parameter of Window. Try setting to false and see if that helps. Will have a look later, but lots to do to catch up...


Happy you are back @abstract ! Hope you enjoyed your time holdiday with family.. and inspiration for relaxing apps :slight_smile: .. Have nice time again at the forum :slight_smile: See you soon :wink:

When I set it to optimize:false, my problem was solved. It's been killing me for a few days. I stopped doing the activity with window and scrolled with pressmove myself. I used slider for the side scrollbar.

Now I can use windows again. What does optimizing do? What if it is set to false by default in ZIM?

Optimize removes objects if they are not in the window view. This make scrolling large numbers of items more efficient. It was discovered by @amihanya and implemented in ZIM version ZIM 00. Generally, we have not had any issues with it - so there must be something specific to your app. It would be good if we could figure out what that is and see if we can accommodate it rather than setting it to false by default. Leaving it as true will improve performance.

It's okay when it's slow scrolling. The problem occurs when fast scrolling with the mouse. Also, when you reach the end of the list, you need to immediately go to the beginning of the list. This again poses a problem because it is a very fast transition. For now, I will set the optimize to false and use it.

1 Like

It looks like you have a fair bit in the window... is it on mobile you noticed the problem or on desktop too?

Yes, there are a lot of things in window. There was a problem with the desktop. But let me tell you what's more interesting, I have the same problem when I scroll with the mouse wheel. That's why I set it to scrollWheel:false. When scrollWheel is true, I have problems even if there are very few objects in the window.

Maybe we should throttle the scrollwheel.