From d35c9db026170a7a6a8980a86904fd43205d24ab Mon Sep 17 00:00:00 2001 From: Sebastien Rothlisberger Date: Thu, 23 Apr 2015 14:07:16 -0400 Subject: [PATCH] Fixed height after open on IE --- bower.json | 2 +- demo/ng-slide-down.js | 2 +- dist/ng-slide-down.js | 2 +- dist/ng-slide-down.min.js | 4 ++-- src/ng-slide-down.coffee | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bower.json b/bower.json index 343340a..eeef746 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ng-slide-down", - "version": "0.3.0", + "version": "0.3.1", "authors": [ "TheRusskiy " ], diff --git a/demo/ng-slide-down.js b/demo/ng-slide-down.js index 249a8c3..0b4066a 100644 --- a/demo/ng-slide-down.js +++ b/demo/ng-slide-down.js @@ -52,7 +52,7 @@ return element.css({ overflow: 'visible', transition: 'none', - height: 'initial' + height: 'auto' }); }, duration * 1000); }); diff --git a/dist/ng-slide-down.js b/dist/ng-slide-down.js index 249a8c3..0b4066a 100644 --- a/dist/ng-slide-down.js +++ b/dist/ng-slide-down.js @@ -52,7 +52,7 @@ return element.css({ overflow: 'visible', transition: 'none', - height: 'initial' + height: 'auto' }); }, duration * 1000); }); diff --git a/dist/ng-slide-down.min.js b/dist/ng-slide-down.min.js index 37815e9..50a776a 100644 --- a/dist/ng-slide-down.min.js +++ b/dist/ng-slide-down.min.js @@ -1,2 +1,2 @@ -/*! ng-slide-down 21-12-2014 */ -(function(){"use strict";angular.module("ng-slide-down",[]).directive("ngSlideDown",["$timeout",function(a){var b,c;return b=function(a,b){return void 0!==b.lazyRender?"
":"
"},c=function(b,c,d){var e,f,g,h,i,j,k,l,m,n;return f=d.duration||1,g=c.scope(),h=d.emitOnClose,l=d.onClose,k=void 0!==d.lazyRender,e=null,m=null,i=function(){var a,b,d,e,f;for(d=0,b=c.children(),e=0,f=b.length;f>e;e++)a=b[e],d+=a.clientHeight;return""+d+"px"},n=function(){return e&&a.cancel(e),k&&(b.lazyRender=!0),a(function(){return m&&a.cancel(m),c.css({overflow:"hidden",transitionProperty:"height",transitionDuration:""+f+"s",transitionTimingFunction:"ease-in-out",height:i()}),m=a(function(){return c.css({overflow:"visible",transition:"none",height:"initial"})},1e3*f)})},j=function(){return m&&a.cancel(m),c.css({overflow:"hidden",transitionProperty:"height",transitionDuration:""+f+"s",transitionTimingFunction:"ease-in-out",height:"0px"}),h||l||k?e=a(function(){return h&&b.$emit(h,{}),l&&g.$eval(l),k?b.lazyRender=!1:void 0},1e3*f):void 0},b.$watch("expanded",function(b){return b?a(n):(null!=b&&(c.css({height:i()}),c[0].clientHeight),a(j))})},{restrict:"A",scope:{expanded:"=ngSlideDown"},transclude:!0,link:c,template:function(a,c){return b(a,c)}}}])}).call(this); \ No newline at end of file +/*! ng-slide-down 23-04-2015 */ +(function(){"use strict";angular.module("ng-slide-down",[]).directive("ngSlideDown",["$timeout",function(a){var b,c;return b=function(a,b){return void 0!==b.lazyRender?"
":"
"},c=function(b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p;return h=d.duration||1,i=c.scope(),j=d.emitOnClose,n=d.onClose,m=void 0!==d.lazyRender,g=null,o=null,k=function(a){var b,d,e,f,g;for(e=0,d=c.children(),f=0,g=d.length;g>f;f++)b=d[f],e+=b.clientHeight;return""+e+"px"},p=function(){return g&&a.cancel(g),m&&(b.lazyRender=!0),a(function(){return o&&a.cancel(o),c.css({overflow:"hidden",transitionProperty:"height",transitionDuration:""+h+"s",transitionTimingFunction:"ease-in-out",height:k()}),o=a(function(){return c.css({overflow:"visible",transition:"none",height:"auto"})},1e3*h)})},l=function(){return o&&a.cancel(o),c.css({overflow:"hidden",transitionProperty:"height",transitionDuration:""+h+"s",transitionTimingFunction:"ease-in-out",height:"0px"}),j||n||m?g=a(function(){return j&&b.$emit(j,{}),n&&i.$eval(n),m?b.lazyRender=!1:void 0},1e3*h):void 0},b.$watch("expanded",function(b,d){return b?a(p):(null!=b&&(c.css({height:k()}),c[0].clientHeight),a(l))})},{restrict:"A",scope:{expanded:"=ngSlideDown"},transclude:!0,link:c,template:function(a,c){return b(a,c)}}}])}).call(this); \ No newline at end of file diff --git a/src/ng-slide-down.coffee b/src/ng-slide-down.coffee index c97b8a6..c00c2d6 100644 --- a/src/ng-slide-down.coffee +++ b/src/ng-slide-down.coffee @@ -38,7 +38,7 @@ angular.module("ng-slide-down", []).directive "ngSlideDown", ($timeout )-> element.css { overflow: "visible" transition: "none", - height: "initial" + height: "auto" } , duration*1000