(js) Improve sg-ripple-click directive
This commit is contained in:
parent
bc10e0983a
commit
bafb082abf
|
@ -91,7 +91,7 @@
|
||||||
|
|
||||||
if (content.classList.contains('ng-hide')) {
|
if (content.classList.contains('ng-hide')) {
|
||||||
// Show ripple
|
// Show ripple
|
||||||
angular.element(container).css({ 'overflow': 'hidden' });
|
angular.element(container).css({ 'overflow': 'hidden', 'position': 'relative' });
|
||||||
angular.element(content).css({ top: container.scrollTop + 'px' });
|
angular.element(content).css({ top: container.scrollTop + 'px' });
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
// Wait until next digest for CSS animation to work
|
// Wait until next digest for CSS animation to work
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
content.classList.add('ng-hide');
|
content.classList.add('ng-hide');
|
||||||
// Restore overflow of container once the animation is completed
|
// Restore overflow of container once the animation is completed
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
angular.element(container).css({ 'overflow': '' });
|
angular.element(container).css({ 'overflow': '', 'position': '' });
|
||||||
}, 800);
|
}, 800);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue