Browse Source

Add failsafe for dimmer

pull/1785/head
jlukic 9 years ago
parent
commit
296463bfb8
1 changed files with 11 additions and 9 deletions
  1. 20
      src/definitions/modules/dimmer.js

20
src/definitions/modules/dimmer.js

@ -215,13 +215,14 @@ $.fn.dimmer = function(parameters) {
if(settings.useCSS && $.fn.transition !== undefined && $dimmer.transition('is supported')) {
$dimmer
.transition({
animation : settings.transition + ' in',
animation : settings.transition + ' in',
queue : false,
duration : module.get.duration(),
onStart : function() {
duration : module.get.duration(),
useFailSafe : true,
onStart : function() {
module.set.dimmed();
},
onComplete : function() {
onComplete : function() {
module.set.active();
callback();
}
@ -255,13 +256,14 @@ $.fn.dimmer = function(parameters) {
module.verbose('Hiding dimmer with css');
$dimmer
.transition({
animation : settings.transition + ' out',
queue : false,
duration : module.get.duration(),
onStart : function() {
animation : settings.transition + ' out',
queue : false,
duration : module.get.duration(),
useFailSafe : true,
onStart : function() {
module.remove.dimmed();
},
onComplete : function() {
onComplete : function() {
module.remove.active();
callback();
}

Loading…
Cancel
Save