Hi all,
When element is dragged near the viewport left boundary no scroll the browser.
Ext version 1.0.1
yui 2.2.2
windows XP
Firefox 2.0.0.6, IE6 and IE7
No firebug error
Ext.namespace("webmessaging.ImageDragZone");
webmessaging.ImageDragZone = function(obj, config){
Ext.apply(this, config);
webmessaging.ImageDragZone.superclass.constructor. call(this, obj, config);
};
Ext.extend(webmessaging.ImageDragZone, Ext.dd.DragZone, {
target: null,
clsTarget: null,
handle: null,
getImg: null,
scope:null,
getDragData : function(e){
this.target = e.getTarget(this.clsTarget);
if(this.target){
var selNodes = this.target;
var dragData = {
nodes: selNodes
};
<%-- IE bug: DnD proxy width is buggy, set it manually --%>
if(Ext.isIE) {
Ext.util.CSS.refreshCache();
Ext.util.CSS.updateRule('.x-dd-drag-ghost','width', 90);
}
dragData.ddel = this.getProxyImg.call(this.scope != null ? this.scope : this, this.target);
dragData.single = true;
return dragData;
}
return false;
},
afterRepair:function(){
this.dragging = false;
},
getRepairXY : function(e){
var xy = Ext.fly(this.dragData.ddel).getXY();
xy[0]-=20; <%-- X less 20 pixel to fit screen limits --%>
return xy;
},
onDragDrop: function(e, dd){
this.handle.call(this);
}
});
[...]
Ext.namespace("webmessaging.rightbarDragZone");
webmessaging.rightbarDragZone = function(obj, config){
Ext.apply(this, config);
webmessaging.rightbarDragZone.superclass.construct or.call(this, obj, config);
}
Ext.extend(webmessaging.rightbarDragZone, webmessaging.ImageDragZone, {
onDragDrop: function(e, dd){
this.handle.call(this, {params: Rightbar.getThumbnailData(this.target.id)});
}
});
[...]
this.dragZone = new webmessaging.rightbarDragZone(obj,{
clsTarget: '.contextmenuThumbnail',
handle: this.getHandler(),
containerScroll:true,
ddGroup: this.getDnDGroup(),
getProxyImg: this.getImg,
scope: this
});
this.dragZone.scroll = true;
this.dragZone.onMouseDown = function(e){
this.setXConstraint(this.startPageX,95);
}
http://extjs.com/forum/showthread.php?t=8887
Allergies.. no relief?!?
Religion in the workplace? |