nyroModel 不会自动调整大小 [英] nyroModel does not auto resize

查看:18
本文介绍了nyroModel 不会自动调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 $.nmManual 代替默认的 .nyroModal .默认的 nyroModel 会根据浏览器窗口大小自动调整模型大小,但在尝试设置此选项时,过滤器充其量是模糊的.

Using $.nmManual instead of the default .nyroModal . The default nyroModel will resize the model automatically based on the browser window size, but the filters are vague at best when trying to set this.

$('.nyroModal').nyroModal(); 默认函数工作正常.

$.nmManual('test.html', {
                        modal: true,              //doesn't seem to do anything  
                               sizes: {
                                      minW: 805,   //this works
                                      minH: 610,
                                      },
                        showCloseButton: false,   //also works
                        anim: { 
                           resize: true,          //both these do nothing
                           showTrans:true,
                        }

我的 nyromodel 站点很难准确理解 resizedefshowtrans 实际使用的参数.

I nyromodel site makes it quite hard to understand exactly what parameters the resize, def, and showtrans actually use.

推荐答案

我有一些关于通过$.nmManual在手动模式下使用插件的答案.基本上你必须用这样的代码来初始化过滤器:

I have some answers about using the plugin in manual mode through $.nmManual. Basically you have to init filters with a code like this:

$.nmManual('http://mypage.html/', {
    callbacks: { 
      initFilters: function(nm) {
      nm.filters.push('somefilter');
      nm.filters.push('anotherfilter');
    }
  }
});

要手动打开一个页面,你只需要 $.nmManual('mypage.html'); 如果我没记错的话它会加载 link 过滤器,但是如果你想要在 iframe 中手动打开页面,您需要 linkiframe 过滤器:在 nyroModal 中手动打开 iframe?

To open manually a page just you need $.nmManual('mypage.html'); if I remember right it will load the link filter, but if you want open manually a page inside an iframe you need both link and iframe filter: Open iframe manually in nyroModal?

关于调整加载页面的大小,前段时间我正在处理但我没有结果...使用此代码:

About resizing of a loaded page, time ago I was dealing with but I have no results... using this code:

$(window).resize(function() {
    if($.nmTop() !== undefined)
    {
        $.nmTop().resize(true);
    }
});

我们可以强制调整大小,但在这种情况下,它的效果非常糟糕,正如您在玩窗口时看到的那样有一个延迟步骤...我没有更多时间重写 resize 函数...

we can force resizing but in this case it works very bad, with a delay step as you can see playing with the window... I had no more time to rewrite resize function...

我不知道这种行为是否与使用 DOM 选择器相同.

I don't know if this behaviour is the same with using a DOM selector.

最后,选项 modal: true 可防止在您单击弹出窗口边缘(即在深色背景中)时关闭弹出窗口.

Finally the option modal: true prevents closing of the popup window when you click outside its edge, that is in the dark background.

这篇关于nyroModel 不会自动调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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