Hi,
Michael Buerge and Michael Pemberton both posted code to do this (each
different) last week, as the posts were in my to-do tray, I'll quote them
here, and attach relevant files.
Also check Glen_Deas_Examples on my site for an example.
http://www.richardinfo.com/?menu=examples&node=8

the drag.zip file is from Michael Pemberton .Search the archives for the
original post titled:  (see sig)
Re: [Dynapi-Dev] Drag Event suggestions

Post from Michael Buerge : (with dragevent.zip)
<quote>
. i did this just
yesterday and it was intended to be posted this evening (CET).

i attached the modified dragevent.js-file.
there's one line added in DragEvent.lyrListener.onmousedown, the additional
code is at the end of the document.

sample code:

myLayer = new DynLayer(null,100,100,100,100,'red');
DynAPI.document.addChild(myLayer);
area = new DragArea('rect',0,100,20,0);
DragEvent.addDragArea(myLayer, area);
DragEvent.enableDragEvents(myLayer);


at the moment, two different DragArea-types are supported:
new DragArea('rect',t,r,b,l)
new DragArea('circle',centerX,centerY,radius);

multiple DragAreas can be added, to a layer

if you need more complex areas, you can add them yourself, it shouldn't be
too difficult to understand the code.

--
Michael Buerge
</quote>

Cheers,
Richard Bennett

[EMAIL PROTECTED]
www.richardinfo.com
(Everything running on, and ported to the 19/12/2000 snapshot of DynAPI2)
Find the DynAPI faq here:
http://sourceforge.net/docman/display_doc.php?docid=656&group_id=5757
Browse the mailinglist here:
http://www.mail-archive.com/index.php3?hunt=dynapi




----- Original Message -----
From: "Lluis Casany" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 26, 2001 4:36 PM
Subject: [Dynapi-Help] Drag a Layer just by the map zone of a image


>
> I'd like to drag a layer by the map zone of an image that is in the layer.
> Is that possible? I mean, anyone have ever get it?
>
> See the link to see better what I'd like and feel free to develop a
> solution, if u like.
> http://www.fruir.net/comp/dynapi/testing/dragmap.html
>
> Thank u very much indeed.
>
> Lluís Casany
>
>  "The highest creative thought is coming".
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
> ____________________________________________________________
> Get your domain name and domain-based e-mail from
> Namezero.com. New!  Namezero Plus domains now available.
> Find out more at: http://www.namezero.com
>

drag.zip

dragevent.zip

Reply via email to