----- Original Message -----
From: "Joachim Lundgren" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 12, 2001 10:29 PM
Subject: Re: [Dynapi-Dev] RE: dragging and forms


> Here comes my take on the subject...
>
> A mouse event for NS4 is fired by the browser at the topmost capturer for
the event - if not the document then something further down. When the event
gets caught by DynAPI then some checks are made (mouseover/out/etc.) and the
DynMouseEvent object is initialized. In case there are other listeners
further down the event is sent down via e.target.handleEvent(e). This is so
the NS4 events will behave like the bottom-to-top chain that is used by IE.
>
> The "e.target!=this" test is so the event doesn't do a circular loop, ie.
the layer mustn't send to itself.

FWIW the line 157 where this test happens is commented out in Dan's beta
code, so either he didn't know what it was in there for, or it was causing
some problem.
And in the dynapiX code Jordi writes in the comments that he copied this
code from the old Dynapi, but wasn't sure what it was there for, or if it
was needed.

>
> One thing that is easy to overlook in the dragevent.js file is that the
mousedown is caught on the layer, but mousemove/mouseup is caught at the
document, meaning that the mousemove handler _will_ be called.
>
> All in all - if Martin's fix solves the problem, I don't see any reason
why it shouldn't be implemented. In my eyes it even looks "right".
You're probably right, just to be sure if this problem was introduced after
dynAPIX , I added the same test to the Dynapix branch in CVS. It shows that
the form layers ARE selectable, but not after a layers has been dragged, so
it was not fully working anyhow.

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/~checkout~/dynapi/dynapix/tes
ts/drag_forms.html

Judging from this I would think that this problem could be avoided without
using the fix, but I'm sure not going to find it, so if nobody else does, I
guess the fix, clearly commented, is the next best thing.
It would be nice if the screen-redraw hacks could somehow be in the
onmouseup part of dragevents, something like :
    if(lyr.doc.forms.length>0){
        //hacks
    }


Doug: Yes, Dan's code has a new mouse.js file, but it's basically the same
code, with the mouse-button stuff in separate functions, and some of the NS4
specific fixes commented out.
He wasn't using a dragevent.js file in the beta tests, but when running our
dragevents.js file from DynAPI_beta, the problem is still the same.
In his window demo you don't have this problem, but that's because he's not
dragging the window, but a ghost-layer.

Richard.




_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[email protected]/

Reply via email to