PDA

View Full Version : Tree loadmask offset from tree element during initial page load



preaction
28 Sep 2011, 3:03 PM
I have a tree store that takes a few seconds to return responses. Since the tree panel has rootVisible: false, it tries to load the root node from the store immediately when the component is being created, but before the parent component is done and the parent's layout can be calculated.

So the load mask seems to be placed where the tree panel used to be, offset from the tree panel's current position, because the tree's position changes after the mask is created.

I've tried running doLayout() on the parent and the mask, but nothing doing for a workaround. I don't have a test case, as it requires a backend process that takes a few seconds to load.

It's not a huge problem, just looks bad.

fschaeffer
28 Sep 2011, 9:57 PM
I can confirm that (sometimes) for 4.0.6. It really depends on how long the server response will need, some times I also have a misplaced loadMask, but the loadMask is moved to the correct place after the server response is sent.

We're also using a TreeStore with rootVisible: false which will load data from the server.

In our case to loadMask of the tree (placed in the west-region of a border panel) is displayed at the top of the page, and after some short time the loadMask will be shifted downwards to the treePanel.

preaction
29 Sep 2011, 7:47 AM
It seems that I can click on the loadMask while it is offset and it will move to where it is supposed to be. Clicking elsewhere in the app doesn't move the loadMask in the Tree, only clicking on the misplaced loadMask itself.