|
I've got this...
<Script language="Javascript"
src="../src/dynapi.js"></script>
<script language="Javascript">
DynAPI.setLibraryPath('../src/lib/');
DynAPI.include('dynapi.api.*');
DynAPI.include('dynapi.event.*');
DynAPI.include('dynapi.ext.dragdrop');
here is the included example that works with DynAPI 2.0 but
not with 2.5
Thanks
Chris
----- Original Message -----
Sent: Tuesday, April 03, 2001 3:49
PM
Subject: Re: [Dynapi-Help] Updated to
DynAPI2.5 and now drop events don't work?
ensuer you are addiing the apporpriate events
files..
(dynapi/src/event)
----- Original Message -----
Sent: Tuesday, April 03, 2001 12:33
PM
Subject: [Dynapi-Help] Updated to
DynAPI2.5 and now drop events don't work?
the code that worked with
DynAPI2...
myListenerDrop2=new EventListener(myTarget2)
myListenerDrop2.ondrop=function(e) {
alert('hi')
}
myTarget2.addEventListener(myListenerDrop2)
This code does not work with DynAPI 2.5...
Anybody have any ideas? Is this a bug?
Thanks.
|
Title: Test Drag & Drop Gilles
Drag and Drop on Targets
Information about the drag layer:
source id:
state:
x:
y:
target id:
cow:
Usage:
This example shows how a layer can be a target,
and can listen for being dropped on.
Once dragdrop.js has been included, you can
simply listen for the ondrop event.
myListenerDrop=new EventListener(myTarget)
myListenerDrop.ondrop=function(e) {
me=e.getTarget()
document.myform.targetid.value = me.id;
}
myTarget.addEventListener(myListenerDrop)
Two things I noted:
* It only works on recent versions of the DynAPI.
* It uses the point x/y of the dragged layer, so you can
half-miss on the right side, but not on the left. This
needs a small correction in the code to fix. (No time now)
|