PDA

View Full Version : two loadmasks conflict



jimswers
17 Dec 2011, 4:31 AM
Hi,

i have two load masks for panels:


window.pieChartMask = new Ext.LoadMask(Ext.get('piechartCmp'), {msg:'Please wait...'});
window.lineChartMask = new Ext.LoadMask(Ext.get('chartCmp'),{msg:'Please wait...'});

when i try to do

pieChartMask.show();
lineChartMask.show();

pieChartMask disappears.
Why is so?
May be additional parametr missing?
Second two lines I call in listeners so I need to use "window." before object.

mitchellsimoens
17 Dec 2011, 6:58 AM
In 4.0.7, the load masks are shared. In what will be 4.1.0 beta 1 this has been changed.

jimswers
17 Dec 2011, 7:27 AM
That's good.
I hope mask will follow the window too, because if you minimize window during loading mask remains on screen.

mitchellsimoens
17 Dec 2011, 7:30 AM
That's good.
I hope mask will follow the window too, because if you minimize window during loading mask remains on screen.

It sure does :)

jimswers
18 Dec 2011, 3:11 AM
That would be nice if we have something like:


win = Ext.getCmp('win-id');
win.enableMask();


now I use


win.disable();

tobiu
18 Dec 2011, 3:24 AM
window.getEl().mask();


should do the trick (untested). You can also try getBody() to only mask the content.

mitchellsimoens
18 Dec 2011, 3:40 AM
window.getEl().mask();


should do the trick (untested). You can also try getBody() to only mask the content.

There is no getBody method on the Ext.window.Window. You can do:


win.body.mask();

The downside to that is if you have any dockedItems, it won't mask it.


win.getEl().mask();
//or
win.el.mask();

Would work and in 4.1.0 beta 1, if you have the Window set as modal, the modal mask and the mask you place on the el will stay. In 4.0.7, once you mask() on the window's el, the modal mask will disappear.

tobiu
18 Dec 2011, 3:51 AM
Mitchell, you are right. The getter is called:


// private
getContentTarget: function() {
return this.body;
}


Not a good choise regarding naming conventions...