Comparing version 2.0.1 to 2.0.2
@@ -260,2 +260,4 @@ /*! CMUI | MIT License | http://cmui.net */ | ||
var FADEOUT_DURATION = 200 | ||
var $elem | ||
@@ -276,6 +278,9 @@ var isVisible = false | ||
// first, shrink | ||
$elem.css('height', '100%') | ||
_shrink() | ||
// then, reset its height. | ||
$elem.css('height', document.documentElement.scrollHeight + 'px') | ||
} | ||
function _shrink() { | ||
$elem.css('height', '100%') | ||
} | ||
@@ -307,2 +312,3 @@ //api | ||
$elem.attr('class', classNames.join(' ')) | ||
_shrink() | ||
isVisible = false | ||
@@ -314,2 +320,5 @@ } | ||
$elem.attr('class', classNames.join(' ')) | ||
setTimeout(() => { | ||
if (!isVisible) _shrink() | ||
}, FADEOUT_DURATION) | ||
isVisible = false | ||
@@ -316,0 +325,0 @@ } |
{ | ||
"name": "cmui", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"homepage": "http://cmui.net/", | ||
@@ -5,0 +5,0 @@ "repository": "CMUI/CMUI", |
@@ -17,2 +17,4 @@ | ||
var FADEOUT_DURATION = 200 | ||
var $elem | ||
@@ -33,6 +35,9 @@ var isVisible = false | ||
// first, shrink | ||
$elem.css('height', '100%') | ||
_shrink() | ||
// then, reset its height. | ||
$elem.css('height', document.documentElement.scrollHeight + 'px') | ||
} | ||
function _shrink() { | ||
$elem.css('height', '100%') | ||
} | ||
@@ -64,2 +69,3 @@ //api | ||
$elem.attr('class', classNames.join(' ')) | ||
_shrink() | ||
isVisible = false | ||
@@ -71,2 +77,5 @@ } | ||
$elem.attr('class', classNames.join(' ')) | ||
setTimeout(() => { | ||
if (!isVisible) _shrink() | ||
}, FADEOUT_DURATION) | ||
isVisible = false | ||
@@ -73,0 +82,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
148679
3645