Skip to content
Browse files

script.aculo.us: Fix bottom CSS property reassignment and initializat…

…ion in queues for Effect#SlideUp. Closes #7412, #7761.

git-svn-id: http://svn.rubyonrails.org/rails/spinoffs/scriptaculous@7642 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent c5150c5 commit e5242143ba6f9b487dca3a66081cf3887f2fe0a5 @madrobby madrobby committed Sep 26, 2007
Showing with 7 additions and 3 deletions.
  1. +2 −0 CHANGELOG
  2. +5 −3 src/effects.js
View
2 CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fix bottom CSS property reassignment and initialization in queues for Effect#SlideUp. Closes #7412, #7761.
+
* Fix an issue with String#parseStyle that could sometimes cause errors on Safari 2.
* Refactoring to use Prototype 1.6. Remove dependency of Effect.tagifyText from builder. Use Prototype code style rules more consistently.
View
8 src/effects.js
@@ -706,13 +706,15 @@ Effect.SlideDown = function(element) {
Effect.SlideUp = function(element) {
element = $(element).cleanWhitespace();
var oldInnerBottom = element.down().getStyle('bottom');
+ var elementDimensions = element.getDimensions();
return new Effect.Scale(element, window.opera ? 0 : 1,
Object.extend({ scaleContent: false,
scaleX: false,
scaleMode: 'box',
scaleFrom: 100,
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
restoreAfterFinish: true,
- beforeStartInternal: function(effect) {
+ afterSetup: function(effect) {
effect.element.makePositioned();
effect.element.down().makePositioned();
if (window.opera) effect.element.setStyle({top: ''});
@@ -723,8 +725,8 @@ Effect.SlideUp = function(element) {
(effect.dims[0] - effect.element.clientHeight) + 'px' });
},
afterFinishInternal: function(effect) {
- effect.element.hide().undoClipping().undoPositioned().setStyle({bottom: oldInnerBottom});
- effect.element.down().undoPositioned();
+ effect.element.hide().undoClipping().undoPositioned();
+ effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom});
}
}, arguments[1] || { })
);

0 comments on commit e524214

Please sign in to comment.
Something went wrong with that request. Please try again.