[英]Ext Window at the bottom right
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. 但是extjs设置“ top”和“ left”的值,结果在中间窗口中拉伸。
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 CSS导致浏览器
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 使用ExtJs 3.4
You 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.net/dnpTt/4/ 工作示例: http : //jsfiddle.net/dnpTt/4/
Test in ExtJS 5.0.1 在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());
}
}
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.