-
4 Sep 2012 7:32 AM #1
Answered: Overlay panel with a transparent mask
Answered: Overlay panel with a transparent mask
Hello everybody,
I'm trying to create a popover with a transparent mask:
However, I want to make the mask background completely transparent, while keeping the hideOnMaskTap functionality. How can I achieve this?Code:Ext.Viewport.add({ xtype: 'panel', id: 'ap-user-menu', modal: true, hideOnMaskTap: true, items: { xtype: 'button', text: 'Log out', name: 'logout', ui: 'decline' } });
Thanks
-
Best Answer Posted by gruese
Hmm, setting your overlay's modal config to something like { cls: 'opaquemask' } (as suggested by badgerb1 here) works for me.
What platform are you testing on?
-
4 Sep 2012 12:53 PM #2
-
4 Sep 2012 11:24 PM #3
I don't get it, setting the mask to my modal panel will cover it. The mask I want to modify is behind it.
-
4 Sep 2012 11:59 PM #4
I assume setting
in your css/scss file is not an option because you have other masks that are not supposed to be transparent?Code:.x-mask { opacity: 0; }
-
5 Sep 2012 12:02 AM #5
Yes, I can't! It's a view-packed app indeed

-
5 Sep 2012 12:20 AM #6
Hmm, setting your overlay's modal config to something like { cls: 'opaquemask' } (as suggested by badgerb1 here) works for me.
What platform are you testing on?
-
5 Sep 2012 12:32 AM #7
OSX 10.8, Safari 6, but I just found it was my bad.
I did try setting opacity: 0 to the "masked" object, and to the modal -> masked object, but turns out the modal object IS the mask, and I didn't get it before.
Here's the working code:
Code:Ext.Viewport.add({ xtype: 'panel', modal: { style: 'opacity: 0' }, hideOnMaskTap: true, items: { xtype: 'button', text: 'Log out', name: 'logout', ui: 'decline' } });
-
11 Nov 2012 12:04 PM #8
modal: { transparent: true }


Reply With Quote