Mask options

3 views
Skip to first unread message

Philip Thompson

unread,
Dec 2, 2009, 11:26:00 AM12/2/09
to clien...@googlegroups.com
Hello all.

How do you set options for the 'mask' after instantiating StickyWin.Fx.Modal.Ajax? I have something along the lines of...

<code>
this.ajax = new StickyWin.Fx.Modal.Ajax({...});
...
var newMaskOptions = {
// Is this correct?
'height': 100,
...,

// Or is this correct?
'style': {
'height': 100,
...
}
};
this.ajax.setOptions(newMaskOptions);
</code>

Am I even in the ballpark with this? When you instantiate the StickyWin.Fx.Modal.Ajax there is a maskOptions, but I want to be able to change it later. Any help would be appreciated?

Thanks,
~Philip

Aaron Newton

unread,
Dec 2, 2009, 1:41:50 PM12/2/09
to clien...@googlegroups.com
There really isn't a method exposed for you to do this at the moment. The easiest way to do it I guess would be to do this:

this.ajax = new StickyWin.Fx.Modal.Ajax()

...

$(this.ajax.mask).setStyles(...)
OR
this.ajax.mask.setOptions(...).position();

The second example should be used when you want change dimension styles (height, width, the maskMargins option, etc) and the former if you want to change colors or something.

You should file a ticket (in the mootools more lighthouse) to expose a way to alter the options and re-render the element...


--

You received this message because you are subscribed to the Google Groups "Clientcide" group.
To post to this group, send email to clien...@googlegroups.com.
To unsubscribe from this group, send email to clientside+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/clientside?hl=en.



Philip Thompson

unread,
Dec 2, 2009, 3:15:32 PM12/2/09
to clien...@googlegroups.com
Ok, this should get me where I need to be. Thank you.

One quick question. When I draw the mask, there's about 10-12 pixels on the bottom that aren't masked. I think the resize method in the Mask may need to be modified...

<code>
Mask.implement({
    resize: function(x, y){
     ...
     if (this.target == document.body) {
            // Change this line...
            var win = window.getSize();
            
            // ...to be this line
            var win = window.getScrollSize();
            ...
        }
        ...
    }
});
</code>

This above code seems to fix the missing mask at the bottom of my window.... Is this accurate?

Thanks,
~Philip

Philip Thompson

unread,
Dec 2, 2009, 6:57:43 PM12/2/09
to clien...@googlegroups.com
Ok, the method below seems to work on the initial show of the mask. If I resize the window, this implemented method does not get called - I threw in an alert() to see if it was called. In the original show() method of Mask, it creates a resize event that calls the original resize() method. Does my implementing the resize() method cause the "this.resize" reference in the show() method to basically be ignored/forgotten/something?

Thanks in advance,
~Philip

Aaron Newton

unread,
Dec 3, 2009, 10:38:33 AM12/3/09
to clien...@googlegroups.com
that should not be the case. regardless, I'll implement your fix and run some tests.

Could you do me a huge favor and open a ticket in the mootools more lighthouse?

--

Philip Thompson

unread,
Dec 3, 2009, 12:32:31 PM12/3/09
to clien...@googlegroups.com

Aaron Newton

unread,
Dec 4, 2009, 4:25:48 PM12/4/09
to clien...@googlegroups.com
thanks. I'll try and get to it.

Reply all
Reply to author
Forward
0 new messages