nyroModel不会自动调整大小 [英] nyroModel does not auto resize
问题描述
使用$.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网站上,很难确切了解resize
,def
和showtrans
实际使用的参数.
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中手动打开页面,则需要link
和iframe
过滤器: 在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屋!