This project is archived and is in readonly mode.

#209 ✓resolved
Kevin Valdek

Custom show/hide for the Mask element

Reported by Kevin Valdek | December 8th, 2009 @ 10:23 AM | in


First off, this is not a bug, but a feature suggestion.
Mask works great. But just as it's possible to pass custom show and hide functions as options to the Tips class, it would be nice to have the same opportunity for Mask. So you could e.g. show a mask with a transition.

    var megaMask = new Mask({
       onShow: function(maskElement) { //custom },
       onHide: function(maskElement) { //custom }

I'll attach a patch that enables just this.
There is one drawback though. If you have previously used custom onShow and onHide, then this implementation will break your mask as setStyle('display', 'block') and setStyle('display', 'none') will not be invoked. Could some kind of compatibility be included?


Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket