This support forum belongs to the Overlay Extras Gallery Module.
Overlay Extras has a bug tracker here: http://github.com/ericf/yui3-gallery/issues
| Page 1 of 1 | [ 3 posts ] |
|
Hi Eric,
I was wondering if there was a reason you have every Overlay instance that is plugged with OverlayModal create a separate mask node, rather than just creating a mask node once and attaching it statically to the class, so that all instances can reference it? Thanks, Greg |
|
Greg,
Eric Ferraiuolo
My reasoning behind the multiple masks is to make the Overlay with it's MaskNode a "unit". You can reference the MaskNode on a particular Overlay instance by calling myOverlay.get('maskNode'). I wanted to make sure the feature worked in the case when multiple Overlays plugged with Y.Plug.OverlayModal are visible at the same time, and they stacked correctly according to their z-indexes; where the top-most Overlay would mask all other Overlays. Another thing to note: the MaskNode is inserted into the Overlay's parentNode as the firstChild. When the Overlay's z-index property changes, via myOverlay.set('zIndex', 10), the MaskNode's z-index is updated to be the same value. Since the MaskNode exists before the Overlay in the markup it will be behind the Overlay, masking the contents underneath. This approach isn't ideal, and I'd like to make it better and more robust; it hasn't yet become an issue for mean and my use-cases but I can imagine some in which it could be a problem. I should probably do a deep-dive and investigation on how other libraries, or even YUI 2.x, approach this issue. If you'd like to help me figure out a super robust way to deal with issues surrounding Overlay's and masking I'm all ears. One additional feature I've had in the back of my mind is the ability to mask only a particular node instead of always the whole viewport. Are you running into any issues in your code with the current approach to masking? If so hopefully this will help you get through them, or you could explain them and we could try to figure out a solution. |
|
I do like the idea of being able to mask only specific nodes, maybe by having a maskTarget attribute that defaults to the body node. Personally I feel that it kind of goes in the face of the whole purpose of modality if you allow multiple modal dialogs to appear on top of each other, but I suppose not having that limitation gives developers the freedom to find their own way. With the way I want to use it, I think I'm also going to look into making a modal extension for Widget rather than a plugin for Overlay (all widgets have the show/hide functionality so could potentially be modal I would think). I'll let you know what I come up with.
Greg |
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group