Permalink
Browse files

Fixes #558 - Fx.Slide: When the options are set with element.set the …

…resetHeight did not work
  • Loading branch information...
1 parent 5b60a5e commit d847456e5bdcb0fd5669628e9101087b68e93d0d @arian arian committed Apr 18, 2011
Showing with 24 additions and 2 deletions.
  1. +1 −1 Source/Fx/Fx.Slide.js
  2. +21 −0 Specs/1.3/Fx/Fx.Slide.js
  3. +2 −1 Specs/Configuration.js
View
2 Source/Fx/Fx.Slide.js
@@ -57,7 +57,7 @@ Fx.Slide = new Class({
this.addEvent('complete', function(){
this.open = (wrapper['offset' + this.layout.capitalize()] != 0);
- if (this.open && options.resetHeight) wrapper.setStyle('height', '');
+ if (this.open && this.options.resetHeight) wrapper.setStyle('height', '');
}, true);
},
View
21 Specs/1.3/Fx/Fx.Slide.js
@@ -0,0 +1,21 @@
+
+describe('Fx.Slide', function(){
+
+ it('should reset the height when the resetHeight option is set to true by element.set', function(){
+ var div = new Element('div', {text: 'moo'}).inject(document.body);
+ div.set('slide', {
+ resetHeight: true,
+ duration: 20
+ });
+ var fx = div.get('slide');
+ fx.hide().slideIn();
+
+ waits(100);
+
+ runs(function(){
+ expect(fx.wrapper.style.height).toEqual('');
+ fx.wrapper.destroy();
+ });
+ });
+
+});
View
3 Specs/Configuration.js
@@ -57,7 +57,7 @@ Configuration.sets = {
'Types/URI', 'Types/URI.Relative', 'Types/Object.Extras_client',
'Interface/Keyboard', 'Interface/Keyboard.Extras', 'Interface/HtmlTable', 'Interface/HtmlTable.Sort', 'Interface/HtmlTable.Select',
'Forms/Form.Validator',
- 'Fx/Fx.Reveal',
+ 'Fx/Fx.Reveal', 'Fx/Fx.Slide',
'Request/Request.JSONP',
'Utilities/Color', 'Utilities/Group', 'Utilities/Table'
]
@@ -188,6 +188,7 @@ Configuration.source = {
'Interface/HtmlTable.Select',
'Fx/Fx.Reveal',
+ 'Fx/Fx.Slide',
'Request/Request.JSONP',

0 comments on commit d847456

Please sign in to comment.