如何在Kendo UI窗口中检测resizeStop事件? [英] How can I detect resizeStop event on Kendo UI Window?

查看:84
本文介绍了如何在Kendo UI窗口中检测resizeStop事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标题说明了一切...

The title explains it all...

当我知道用户已完成大小调整后,我需要执行自定义操作,但是从Kendo UI文档中可以找到的内容中,没有其他我可以使用的调​​整大小"的事件可供我使用.

I need to perform a custom action when I know a user has finished resizing, but from what I can find in the Kendo UI documentation there is no event for this accessible to me other that 'resize' which I cannot use as is.

也许我只是错过了活动?

Perhaps i just missed the event?

如果不是:

是否可以使用调整大小"事件来确定用户已停止调整大小?

Is there a way to use the 'resize' event to determine that a user has stopped resizing?

推荐答案

所以到目前为止,这是我的答案:

So here's my answer thus far:

我的建筑因建筑需要而略有不同,但这是一个通用解决方案

var isResizing = false;
var wndw = $(element).kendoWindow({
                // .....
                resize: OnResize,
                // .....
            }).data('kendoWindow');

function onResize() {
    isResizing = true;
}

$('body').on('mouseup', '.k-window', function() {
    if(isResizing){
        // **Your 'Stopped' code here**
        isResizing = false;
    }
});

这篇关于如何在Kendo UI窗口中检测resizeStop事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆