hi you're somewhat right but this is not a generic case: I'm working
on specific functionalities of Milkbox (my mootools plugin).
Particularly, I let the users to choose if they want it always
centered on the screen or pinned at some distance from the top of the
window. They also can choose if they want the files to autosize (based
on the window size) or not. Now, if autosize:false, then the images/
files can potentially overflow the window dimensions, and IF
centered:true, the user won't be able to see the entire image by
scrolling the window. Therefore, if the user sets centered:true, then
autosize must be set to true too.

Thank you for the code suggestion, I'll try. It would be great of
Options had some kind of 'onChange' event listener, no? :) Maybe in
the future.





On 20 Dic, 10:38, Tim Wienk <[email protected]> wrote:
> Write your own setOptions method.
>
> You could probably do something like (untested):
>
> setOptions: function(options){
>     if (options.B) options.A = true;
>     Options.prototype.setOptions.call(this, options);
>
> }
>
> I'd personally just not do it, though. Imo options should be optional.
> If option B breaks unless option A has a specific value, how optional
> is option A?

Reply via email to