On 12/6/05, Sebastian Werner <[EMAIL PROTECTED]> wrote:
It is not needed to change anything. It works with the current HEAD code
"condition" it might be what would you like to test. Let's say I want that the "dragstart" event to fire only on left button down:
_myHandleMouseDown = function(e) {
if (e.getButton() != "left")
e.preventDefault();
}
Daniel Dumitrescu schrieb:
>
> Hi Sebastian
>
> Hi Daniel,
>
> The drag and drop manager should not stop the event bubbling. Please
> take a look at QxEventManager and try to find out yourself what's wrong.
>
> In line 628 you find the following:
>
> if (typeof QxDragAndDropManager == "function") {
> (new QxDragAndDropManager).handleMouseEvent(vEventObject);
> };
>
> I don't see any influence to the event bubbling there nor a
> propagationStop call or such a thing. But I am working until weeks on
> renderer and have possible not all details in my head for the
> current HEAD.
>
> Sebastian
>
>
>
> I found a way to supress the drag & grop event and there is no need
> anymore for a "_checkDragStartEvent" function inside QxWidget.
>
> The QxMouseEvent class has a function "preventDefault" which is tested
> only in QxDragAndDropManager, and if this function returns true the
> "dragstart" event is not raised.
>
> So in a common handleMouseDown function is enough to do:
>
> _handleMouseDown = function(e) {
> if (!condition)
> e.preventDefault();
> }
>
> Do you agree this solution?
Looks not so bad. But be sure that it is backward compatible. And please
change this in the renderer branch, too (or send me a patch).
It is not needed to change anything. It works with the current HEAD code
The condition variable in missing in the arguments or what exactly
should "condition" be? A function, a parameter, what?
"condition" it might be what would you like to test. Let's say I want that the "dragstart" event to fire only on left button down:
_myHandleMouseDown = function(e) {
if (e.getButton() != "left")
e.preventDefault();
}
Sebastian
Daniel
