layer扩展打开/关闭动画

本文介绍了如何在layer.js中扩展自定义或第三方动画,以实现弹出窗口和关闭窗口时的动画效果。通过修改特定函数,如Class.pt.creat和Class.pt.config,添加closeAnim参数,并调整layer.close的代码,可以支持使用animate等css动画库来创建独特的弹出和关闭动画。
摘要由CSDN通过智能技术生成

1.    打开窗口时,支持自定义或者第三方动画

       打开layer.js,定位到函数:Class.pt.creat   

        找到代码:

//为兼容jQuery3.0的css动画影响元素尺寸计算
        if (doms.anim[config.anim]) {
            var animClass = 'layer-anim ' + doms.anim[config.anim];
            that.layero.addClass(animClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
                $(this).removeClass(animClass);
            });
        }

修改为(此处只是针对css动画库animate):

//为兼容jQuery3.0的css动画影响元素尺寸计算
        if (doms.anim[config.anim
'Script to check configured options in order to display correct objects on screen If SmartTags("Show Layer 2") Then If SmartTags("HMI- Machine Config.Option_Folder") And Not SmartTags("Bathcer or Hi Fold") Then 'If SmartTags("HMI- Machine Config.Option_Folder") Then SetBit SmartTags("Show Layer 2 w/Folder") End If If SmartTags("Bathcer or Hi Fold") Then SetBit SmartTags("Show Layer 2 w/RTO Folder Options") End If If SmartTags("HMI- Machine Config.Option_Batcher") Then SetBit SmartTags("Show Layer 2 w/Batcher") End If Else ResetBit SmartTags("Show Layer 2 w/Folder") ResetBit SmartTags("Show Layer 2 w/RTO Folder Options") ResetBit SmartTags("Show Layer 2 w/Batcher") End If If SmartTags("Show Layer 3") Then If SmartTags("HMI- Machine Config.Option_Folder") And Not SmartTags("Bathcer or Hi Fold") Then 'If SmartTags("HMI- Machine Config.Option_Folder") Then SetBit SmartTags("Show Layer 3 w/Folder") End If If SmartTags("Bathcer or Hi Fold") Then SetBit SmartTags("Show Layer 3 w/RTO Folder Options") End If If SmartTags("HMI- Machine Config.Option_Batcher") Then SetBit SmartTags("Show Layer 3 w/Batcher") End If Else ResetBit SmartTags("Show Layer 3 w/Folder") ResetBit SmartTags("Show Layer 3 w/Batcher") ResetBit SmartTags("Show Layer 3 w/RTO Folder Options") End If If SmartTags("Show Layer 4") Then If SmartTags("HMI- Machine Config.Option_Folder") And Not SmartTags("Bathcer or Hi Fold") Then 'If SmartTags("HMI- Machine Config.Option_Folder") Then SetBit SmartTags("Show Layer 4 w/Folder") End If If SmartTags("Bathcer or Hi Fold") Then SetBit SmartTags("Show Layer 4 w/RTO Folder Options") End If If SmartTags("HMI- Machine Config.Option_Batcher") Then SetBit SmartTags("Show Layer 4 w/Batcher") End If If SmartTags("HMI- Machine Config.Option_Take_Out_Roll") Then SetBit SmartTags("Show Layer 4 w/Takeout") End If Else ResetBit SmartTags("Show Layer 4 w/Folder") ResetBit SmartTags("Show Layer 4 w/Batcher") ResetBit SmartTags("Show Layer 4 w/Takeout") ResetBit SmartTags("Show Layer 4 w/RTO Folder Options") End If If SmartTags("Show Layer 5") Then If SmartTags("HMI- Machine Config.Option_Folder") And Not SmartTags("Bathcer or Hi Fold") Then 'If SmartTags("HMI- Machine Config.Option_Folder") Then SetBit SmartTags("Show Layer 5 w/Folder") End If If SmartTags("Bathcer or Hi Fold") Then SetBit SmartTags("Show Layer 5 w/RTO Folder Options") End If If SmartTags("HMI- Machine Config.Option_Batcher") Then SetBit SmartTags("Show Layer 5 w/Batcher") End If Else ResetBit SmartTags("Show Layer 5 w/Folder") ResetBit SmartTags("Show Layer 5 w/Batcher") ResetBit SmartTags("Show Layer 5 w/RTO Folder Options") End If If SmartTags("Show Layer 7") Then If SmartTags("HMI- Machine Config.Option_Folder") And Not SmartTags("Bathcer or Hi Fold") Then 'If SmartTags("HMI- Machine Config.Option_Folder") Then SetBit SmartTags("Show Layer 7 w/Folder") End If If SmartTags("Bathcer or Hi Fold") Then SetBit SmartTags("Show Layer 7 w/RTO Folder Options") End If If SmartTags("HMI- Machine Config.Option_Batcher") Then SetBit SmartTags("Show Layer 7 w/Batcher") End If If SmartTags("HMI- Machine Config.Option_Take_Out_Roll") Then SetBit SmartTags("Show Layer 7 w/Takeout") End If Else ResetBit SmartTags("Show Layer 7 w/Folder") ResetBit SmartTags("Show Layer 7 w/RTO Folder Options") ResetBit SmartTags("Show Layer 7 w/Batcher") ResetBit SmartTags("Show Layer 7 w/Takeout") End If
07-14
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值