Great idea Leif!

DynAPI 2.5 is also most at the end of its days. The
new version is where the all the action will begin in
a short while. You can find 2.9.0 at this location:

http://sourceforge.net/project/showfiles.php?group_id=5757

I don't have much information on 2.5 as I'm more into
2.9 and could of greater help if you were designing a
snap library for 2.9.

Keep up the good work!

PS. I think you should make a snap extension to
DynLayer instead of integrating it into the
dragdrop.js files.


--
Raymond Irving




--- Leif W <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> Regarding dynapi-2.5.7 (latest stable copy I could
> find), I've been looking
> at the code trying to figure out where to add some
> "snap-ability".  I've
> worked out some partial snap logic which is
> illustrated in the attached
> diagram.  This illustration includes a source layer
> (to be dragged), a
> target layer (to snap to while dragging), a
> snap-border (to allow for a
> flexible margin of error), and some coordinate logic
> to know whether or not
> to snap.
> 
> My stumbling blocks at this point are three-fold:
> 
> 1) Where to start adding new code?  In the
> dynapi/event/dragevent.js would
> be my best guess.  What about the
> dynapi/ext/dragdrop.js (it doesn't seem to
> have much in it).
> 
> 2) How to get access to both the "source" and
> "target" while dragging?  In
> dragevent.js, we have access to the event, but
> e.getSource() and
> e.getTarget() both return the same object, the layer
> being dragged.
> 
> 3) How to specify which draggable layers can snap,
> and to which layers they
> can snap.
> 
> Regards,
> 
> Leif W
> 
> P.S. As I write, I also have inquiries in the back
> of my mind regarding more
> complex "no-drag" zones and their boundaries.  For
> example, how to specify a
> small region within a layer where blocks can't be
> dragged.  This is to
> complement the "containment" boundaries that are
> already implemented.
> Furthermore, after a drop event, how about the
> problem of repositioning
> layers with respect to the target, and reassinging
> z-indexes of the newly
> dropped and any previously "dropped" layers.  Would
> this involve any new
> code, or is it already possible with existing
> DynLayer parent/child
> relationships?
> 
> P.P.S. Thanks
> 

> ATTACHMENT part 2 image/gif
name=Drag_Drop_Snap_-_Behavioural_Diagram.gif



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to