From fb7f43730989d6a0ba371cbf9119e4315dd292d3 Mon Sep 17 00:00:00 2001 From: lubber-de Date: Sun, 30 May 2021 18:01:40 +0200 Subject: [PATCH 1/2] feat(dimmer): support individual show/hide duration in transition setting --- src/definitions/modules/dimmer.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/definitions/modules/dimmer.js b/src/definitions/modules/dimmer.js index 761c93e1f8..e8c243d514 100755 --- a/src/definitions/modules/dimmer.js +++ b/src/definitions/modules/dimmer.js @@ -335,15 +335,12 @@ $.fn.dimmer = function(parameters) { return $dimmer; }, duration: function() { - if(typeof settings.duration == 'object') { - if( module.is.active() ) { - return settings.duration.hide; - } - else { - return settings.duration.show; - } + if( module.is.active() ) { + return settings.transition.hideDuration || settings.duration.hide || settings.duration; + } + else { + return settings.transition.hideDuration || settings.duration.show || settings.duration; } - return settings.duration; } }, From 130480e2fea45f8e65ab17c58dd341c2b0bcc55b Mon Sep 17 00:00:00 2001 From: lubber-de Date: Sun, 30 May 2021 18:26:20 +0200 Subject: [PATCH 2/2] feat(dimmer): support individual show/hide duration in transition setting --- src/definitions/modules/dimmer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/definitions/modules/dimmer.js b/src/definitions/modules/dimmer.js index e8c243d514..f3678b5541 100755 --- a/src/definitions/modules/dimmer.js +++ b/src/definitions/modules/dimmer.js @@ -339,7 +339,7 @@ $.fn.dimmer = function(parameters) { return settings.transition.hideDuration || settings.duration.hide || settings.duration; } else { - return settings.transition.hideDuration || settings.duration.show || settings.duration; + return settings.transition.showDuration || settings.duration.show || settings.duration; } } },