Hi
The drag and drop is very good, But I would like to have a drag only
option, no drop zones defined.
for example in the draganddrop initialize:
Rico.DragAndDrop.prototype = {
initialize: function() {
this.dropZones = new Array();
this.draggables = new Array();
this.currentDragObjects = new Array();
this.dragElement = null;
this.lastSelectedDraggable = null;
this.currentDragObjectVisible = false;
this.interestedInMotionEvents = false;
this._mouseDown =
this._mouseDownHandler.bindAsEventListener(this);
this._mouseMove =
this._mouseMoveHandler.bindAsEventListener(this);
this._mouseUp = this._mouseUpHandler.bindAsEventListener(this);
this._dragonly = true;
},
...
_mouseUpHandler: function(e) {
if ( ! this.hasSelection() )
return;
var nsEvent = e.which != undefined;
if ( (nsEvent && e.which != 1) || (!nsEvent && e.button != 1))
return;
this.interestedInMotionEvents = false;
if ( this.dragElement == null ) {
this._terminateEvent(e);
return;
}
if ( this._placeDraggableInDropZone(e) )
this._completeDropOperation(e);
else {
this._terminateEvent(e);
if ( !this._dragonly ) {
new Rico.Effect.Position( this.dragElement,
this.origPos.x,
this.origPos.y,
200,
20,
{ complete :
this._doCancelDragProcessing.bind(this) } )
this._doCancelDragProcessing.bind(this);
}
}
Event.stopObserving(document.body, "mousemove", this._mouseMove);
Event.stopObserving(document.body, "mouseup", this._mouseUp);
},
...
or something similar..
Ron
on 11.10.2006 15:03


