Skip to content

Commit

Permalink
feat(dimmer): add onVisible and onHidden callbacks
Browse files Browse the repository at this point in the history
Implemented the onVisible and onHidden callbacks for the Dimmer module.

onVisible is triggereg when dimmer is fully shown, and onHidden when dimmer fully hidden.
  • Loading branch information
prudho authored Jul 2, 2021
1 parent 4d86955 commit 70f7bc3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/definitions/modules/dimmer.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ $.fn.dimmer = function(parameters) {
},
onComplete : function() {
module.set.active();
settings.onVisible.call($dimmer);
callback();
}
})
Expand All @@ -285,6 +286,7 @@ $.fn.dimmer = function(parameters) {
.fadeTo(module.get.duration(), settings.opacity, function() {
$dimmer.removeAttr('style');
module.set.active();
settings.onVisible.call($dimmer);
callback();
})
;
Expand All @@ -310,6 +312,7 @@ $.fn.dimmer = function(parameters) {
module.remove.dimmed();
module.remove.variation();
module.remove.active();
settings.onHidden.call($dimmer);
callback();
}
})
Expand All @@ -323,6 +326,7 @@ $.fn.dimmer = function(parameters) {
module.remove.dimmed();
module.remove.active();
$dimmer.removeAttr('style');
settings.onHidden.call($dimmer);
callback();
})
;
Expand Down Expand Up @@ -704,6 +708,8 @@ $.fn.dimmer.settings = {
onChange : function(){},
onShow : function(){},
onHide : function(){},
onVisible : function(){},
onHidden : function(){},

error : {
method : 'The method you called is not defined.'
Expand Down

0 comments on commit 70f7bc3

Please sign in to comment.