admin管理员组文章数量:1334133
I want to make a small status bar at the bottom right of the screen. But extjs sets the values of "top" and "left", and The result is stretched in the center window.
var swindow = new Ext.Window({
width:100,
style:'position:fixed; right:0;bottom:0;',
baseCls:'lk-sysstate-spanel',
shadow: false,
closable:false,
hideBorder: false,
plain: true,
items:[
historyPanel,
smallPanel
]
});
css result in a browser
element.style {
bottom: 0;
display: block;
left: 675px;
position: fixed;
right: 0;
top: -5000px;
visibility: visible;
width: 98px;
z-index: 9003;
}
Use ExtJs 3.4
I want to make a small status bar at the bottom right of the screen. But extjs sets the values of "top" and "left", and The result is stretched in the center window.
var swindow = new Ext.Window({
width:100,
style:'position:fixed; right:0;bottom:0;',
baseCls:'lk-sysstate-spanel',
shadow: false,
closable:false,
hideBorder: false,
plain: true,
items:[
historyPanel,
smallPanel
]
});
css result in a browser
element.style {
bottom: 0;
display: block;
left: 675px;
position: fixed;
right: 0;
top: -5000px;
visibility: visible;
width: 98px;
z-index: 9003;
}
Use ExtJs 3.4
Share Improve this question edited Oct 25, 2013 at 9:58 calculon asked Oct 25, 2013 at 5:39 calculoncalculon 1252 silver badges14 bronze badges2 Answers
Reset to default 4You can add listener to window and remove left/top styles. Example:
var swindow = new Ext.Window({
[...]
listeners: {
show: function() {
this.el.setStyle('left', '');
this.el.setStyle('top', '');
}
}
});
Working sample: http://jsfiddle/dnpTt/4/
Test in ExtJS 5.0.1
var w = window.innerWidth;
var h = window.innerHeight;
var swindow = new Ext.Window({
[...]
listeners: {
show: function() {
this.setX(w -this.getWidth());
this.setY(h -this.getHeight());
}
}
});
本文标签: javascriptExt Window at the bottom rightStack Overflow
版权声明:本文标题:javascript - Ext Window at the bottom right - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742342654a2456910.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论