I've played with this a bit more and have found that the
scaleMode.originalHeight and scaleMode.originalWidth aren't getting
set properly if the original values are 'auto' and the element is
hidden prior to the call to blindDown (and I suspect slideDown, etc
suffer the same problem). I was able to get around this by adding a
beforeSetupInternal to blindDown which shows the element prior to
getting the computed width and height. I also found that the
makeClipping call had to be moved as well or the computed height
didn't come out right. Below is the change to get it working:
MochiKit.Visual.blindDown = function (element, /* optional */ options)
{
/***
Blind an element down: restore its vertical size.
***/
var d = MochiKit.DOM;
var s = MochiKit.Style;
element = d.getElement(element);
var elemClip;
options = MochiKit.Base.update({
scaleContent: false,
scaleX: false,
scaleFrom: 0,
restoreAfterFinish: true,
beforeSetupInternal: function (effect) {
elemClip = d.makeClipping(effect.element);
s.showElement(effect.element);
effect.options.scaleMode = {originalHeight:
s.getElementHeight(element),
originalWidth: s.getElementWidth(element)};
},
afterSetupInternal: function (effect) {
s.setStyle(effect.element, {height: '0px'});
},
afterFinishInternal: function (effect) {
d.undoClipping(effect.element, elemClip);
}
}, options);
return new MochiKit.Visual.Scale(element, 100, options);
};
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---