Derrell Lipman schrieb:
> Christian, it appears that all you've done here is revert to the
> original behavior including your original patch. You've removed my
> changes that alllow a drop onto self when self really supports it.
> The problem with returning 'true' unconditionally in supportsDrop() is
> that it allows, for example, dragging of a list item to show a "drop
> ok" icon when it hovers over itself. supportsDrop() must only return
> true when it is really ok to drop there. It can't be unconditional.
>
I know. That's why I didn't provide a patch, but just sent the hack that
I will use to achieve the desired outcome until it is fixed to make it
easier to find out what is wrong. Of course there need to be a real
solution to the problem... Thanks, Christian
> Derrell
>
> On 9/6/07, bibliograph <[EMAIL PROTECTED]> wrote:
>
>> Some random hacking of the qooxdoo 0.7 code reveals thatt if I patch the
>> current 0.7 branch code like this, it does what I want. But this is
>> hardly the solution and might have many unintended consequences.
>>
>> qx.ui.core.Widget.prototype.supportsDrop = function (dragCache)
>> {
>> var supportsDropMethod = this.getSupportsDropMethod();
>> if (supportsDropMethod !== null) {
>> return supportsDropMethod.call(this, dragCache);
>> }
>> return true; // the original code checks for (dragCache.sourceWidget
>> == this), but have to return true by default otherwise it will alway
>> return false
>> };
>>
>> qx.event.handler.DragAndDropHandler.prototype.getDropTarget =
>> qx.core.Variant.select("qx.client",
>> {
>> "gecko" : function(e)
>> {
>> var vCurrent = e.getTarget();
>>
>> // we need to comment out the following bit
>> // if (vCurrent == this.__dragCache.sourceWidget) {
>> // vCurrent =
>> qx.event.handler.EventHandler.getTargetObject(qx.html.ElementFromPoint.getElementFromPoint(e.getPageX(),
>> e.getPageY()));
>> // } else {
>>
>>
>> vCurrent = qx.event.handler.EventHandler.getTargetObject(null,
>> vCurrent);
>>
>>
>> // }
>>
>> while (vCurrent != null)
>> {
>>
>> if (!vCurrent.supportsDrop(this.__dragCache)) {
>> return null;
>> }
>>
>> if (this.supportsDrop(vCurrent)) {
>> return vCurrent;
>> }
>>
>> vCurrent = vCurrent.getParent();
>> }
>>
>> return null;
>> },
>>
>> "default" : function(e)
>> {
>> var vCurrent = e.getTarget();
>>
>> while (vCurrent != null)
>> {
>> if (!vCurrent.supportsDrop(this.__dragCache)) {
>> return null;
>> }
>>
>> if (this.supportsDrop(vCurrent)) {
>> return vCurrent;
>> }
>>
>> vCurrent = vCurrent.getParent();
>> }
>>
>> return null;
>> }
>> });
>>
>> bibliograph schrieb:
>>
>>> Hello Sebastian and others,
>>>
>>> I am still having the same problem with drag and drop over the tree and
>>> both Derrell and I cannot do anything without your input. I have
>>> produced a screencast to demonstrate the problem:
>>>
>>> http://m41s09.vlinux.de/dragDropProblem.avi (Sorry, 2MB)
>>>
>>> I am using Firefox 2.06. In the screencast, I am monitoring the drag
>>> target (variable vCurrent) in
>>> qx.event.handler.DragAndDropHandler.getDropTarget() .
>>>
>>> In seconds 00-11, I am dragging on the source widget (a treevirtual)
>>> itself. The drag target is sometimes a label, a hbox layout, or the
>>> split pane, but NEVER the TreeVirtual, which it should be. Since the
>>> drop Target doesn't find a supportsDrop method, it bubbles up to the
>>> client document and then returns false because drop target is identical
>>> with drag source.
>>>
>>> In seconds 11- 21, I am hovering over the left TreeVirtual, and the drop
>>> target is correct.
>>>
>>> I have experimented with the code that retrieves the correct drop type,
>>> but I do simply not have the background to know what I am doing there.
>>>
>>> It is really important to solve this if qooxdoo is to have extensive
>>> drag & drop support and I hope you can help.
>>>
>>> Thanks,
>>>
>>> Christian
>>>
>>>
>>>
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Splunk Inc.
>>> Still grepping through log files to find problems? Stop.
>>> Now Search log events and configuration files using AJAX and a browser.
>>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>>> _______________________________________________
>>> qooxdoo-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>
>>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems? Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel