diff --git a/src/brix/component/navigation/Layer.hx b/src/brix/component/navigation/Layer.hx index b9a8e8f..5569dd2 100644 --- a/src/brix/component/navigation/Layer.hx +++ b/src/brix/component/navigation/Layer.hx @@ -236,11 +236,6 @@ with sum of the css classes */ public function show(transitionData:Null = null, preventTransitions:Bool = false) : Void { - if (status != hidden && status != notInit) - { - trace("Warning: can not show the layer, since it has the status '"+status+"'"); - return; - } // reset transition if it is pending if (status == hideTransition) { @@ -255,6 +250,11 @@ with sum of the css classes doShowCallback(null); removeTransitionEvent(doShowCallback); } + if (status != hidden && status != notInit) + { + trace("Warning: can not show the layer, since it has the status '"+status+"'"); + return; + } // update status status = showTransition; @@ -331,10 +331,6 @@ with sum of the css classes */ public function hide(transitionData:Null = null, preventTransitions:Bool) : Void {// trace("hide "+preventTransitions); - if (status != visible && status != notInit){ - //trace("Warning, can not hide the layer, since it has the status '"+status+"'"); - return; - } // reset transition if it is pending if (status == hideTransition){ trace("Warning: hide break previous transition hide"); @@ -347,6 +343,10 @@ with sum of the css classes doShowCallback(null); removeTransitionEvent(doShowCallback); } + if (status != visible && status != notInit){ + trace("Warning, can not hide the layer, since it has the status '"+status+"'"); + return; + } // update status status = hideTransition;