@@ -54,7 +54,9 @@ $.effects.effect.scale = function( o ) {
54
54
origin = o . origin ,
55
55
original = {
56
56
height : el . height ( ) ,
57
- width : el . width ( )
57
+ width : el . width ( ) ,
58
+ outerHeight : el . outerHeight ( ) ,
59
+ outerWidth : el . outerWidth ( )
58
60
} ,
59
61
factor = {
60
62
y : direction != 'horizontal' ? ( percent / 100 ) : 1 ,
@@ -74,7 +76,9 @@ $.effects.effect.scale = function( o ) {
74
76
options . from = o . from || ( mode == 'show' ? { height : 0 , width : 0 } : original ) ;
75
77
options . to = {
76
78
height : original . height * factor . y ,
77
- width : original . width * factor . x
79
+ width : original . width * factor . x ,
80
+ outerHeight : original . outerHeight * factor . y ,
81
+ outerWidth : original . outerWidth * factor . x
78
82
} ;
79
83
80
84
if ( options . fade ) { // Fade option to support puff
@@ -122,21 +126,14 @@ $.effects.effect.size = function( o ) {
122
126
}
123
127
original = {
124
128
height : el . height ( ) ,
125
- width : el . width ( )
129
+ width : el . width ( ) ,
130
+ outerHeight : el . outerHeight ( ) ,
131
+ outerWidth : el . outerWidth ( )
126
132
} ;
127
133
128
134
el . from = o . from || original ;
129
135
el . to = o . to || original ;
130
136
131
- // Adjust
132
- if ( origin ) { // Calculate baseline shifts
133
- baseline = $ . effects . getBaseline ( origin , original ) ;
134
- el . from . top = ( original . height - el . from . height ) * baseline . y ;
135
- el . from . left = ( original . width - el . from . width ) * baseline . x ;
136
- el . to . top = ( original . height - el . to . height ) * baseline . y ;
137
- el . to . left = ( original . width - el . to . width ) * baseline . x ;
138
- }
139
-
140
137
// Set scaling factor
141
138
factor = {
142
139
from : {
@@ -183,6 +180,16 @@ $.effects.effect.size = function( o ) {
183
180
$ . effects . createWrapper ( el ) ;
184
181
el . css ( 'overflow' , 'hidden' ) . css ( el . from ) ;
185
182
183
+ // Adjust
184
+ if ( origin ) { // Calculate baseline shifts
185
+ baseline = $ . effects . getBaseline ( origin , original ) ;
186
+ el . from . top = ( original . outerHeight - el . outerHeight ( ) ) * baseline . y ;
187
+ el . from . left = ( original . outerWidth - el . outerWidth ( ) ) * baseline . x ;
188
+ el . to . top = ( original . outerHeight - el . to . outerHeight ) * baseline . y ;
189
+ el . to . left = ( original . outerWidth - el . to . outerWidth ) * baseline . x ;
190
+ }
191
+ el . css ( el . from ) ; // set top & left
192
+
186
193
// Animate
187
194
if ( scale == 'content' || scale == 'both' ) { // Scale the children
188
195
0 commit comments