From fbca9f0f57980b1716acd3de13288e53c3fdceb1 Mon Sep 17 00:00:00 2001 From: cap2501 Date: Mon, 28 Aug 2006 04:33:41 +0000 Subject: [PATCH] Removed frame around draggable blocks and fixed 'short drag' bug. --- lib/ajax/block_classes.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/ajax/block_classes.js b/lib/ajax/block_classes.js index b6e1f7b776..6b7c9cfdc6 100644 --- a/lib/ajax/block_classes.js +++ b/lib/ajax/block_classes.js @@ -66,6 +66,7 @@ block_class.prototype.startDrag = function(x, y) { dragEl.className = clickEl.className; dragEl.style.color = this.DDM.getStyle(clickEl, "color");; dragEl.style.backgroundColor = this.DDM.getStyle(clickEl, "backgroundColor"); + dragEl.style.border = '0px'; var s = clickEl.style; s.opacity = .1; @@ -103,6 +104,7 @@ block_class.prototype.onDragDrop = function(e, id) { oDD = YAHOO.util.DDM.getBestMatch(id); } + var el = this.getEl(); YAHOO.log("id="+id+" el = "+e+" x="+YAHOO.util.Dom.getXY(this.getDragEl())); @@ -150,6 +152,11 @@ block_class.prototype.move_block = function(columnid){ if(this.debug && inserttarget != null)YAHOO.log("moving "+this.getEl().id+" before "+inserttarget.getEl().id+" - parentNode="+this.getEl().parentNode.id); + if(this == inserttarget){ + if(this.debug)YAHOO.log("Dropping on self, resetting"); + this.endDrag(); + return; + } //remove from document if(this.getEl().parentNode != null) -- 2.39.5