draggable: {
insertProxy: false ,//设置不需要虚边框
//拖动事件
onDrag: function(e) {
//获得移动之后的对象,代理对象
var pel = this.proxy.getEl();
this.x = pel.getLeft(true);//设置坐标
this.y = pel.getTop(true);
//获得阴影对象
var s = this.panel.getEl().shadow;
//设置阴影与拖动同步
if(s) {
s.realign(this.x,this.y,pel.getWidth(),pel.getHeight())
}
},
//松开鼠标是触发
endDrag: function(e) {
//设置panel到拖动之后的位置
this.panel.setPosition(this.x,this.y);
}
初学Extjs,陌生的东西太多了。暂时不理解,先会用
ExtJs中panel对象可拖动相关事件及代码
最新推荐文章于 2021-08-27 10:11:23 发布