From: Abre C. <ac...@ou...> - 2002-11-25 23:13:14
|
Oops - you're right. I'm using a much earlier version. =20 =20 There are great docs for 2.5.6. =20 http://dynapi.sourceforge.net/doccenter/ =20 Maybe just use that version ;) =20 - Abre -----Original Message----- From: Arthur Dardia [mailto:da...@rp...] Sent: Monday, November 25, 2002 5:57 PM To: dyn...@li... Subject: RE: [Dynapi-Help] stop drag event listener? Ummm, slight problem. I have 2.9 and it doesn't know what EventListener = is...:-/ I did a text search in the dynapi-2.9 directory and it didn't = find a single occurence of it. :-/=20 Regards,=20 Art Dardia=20 _____________________________________________ Computer Science and Computer & Systems Engineering Rensselaer Polytechnic Institute 284 Pawling Ave., Troy, NY 12180 USA=20 phone: (518) 271-6521 :: cell: (973) 626-6819 -----Original Message----- From: dyn...@li... = [mailto:dyn...@li...] On Behalf Of Abre Chase Sent: Monday, November 25, 2002 4:33 PM To: dyn...@li... Subject: RE: [Dynapi-Help] stop drag event listener? Try something like: =20 dragListener=3Dnew EventListener(dragObj) =20 dragListener.ondragend=3Dfunction(e) { } =20 dragObj.addEventListener(dragListener) -----Original Message----- From: Arthur Dardia [mailto:da...@rp...] Sent: Monday, November 25, 2002 1:21 PM To: dyn...@li... Subject: [Dynapi-Help] stop drag event listener? Hey all, I'm new to the list, but I hope to get involved more. I'm trying to = develop a site that using some sort of DHTML engine in order to = implement a layering system. My goal is to create a new interface that = will load a set of layers: =20 Each layer will have a Z+ icon to increase it's Z index, a Z- icon to = decrease it's Z index, and an X icon to "close" the layer. There will = be a lock layers icon and a unlock layers icon that will globally = lock/unlock all layers to their current positions. The goal is to use = this to allow users to reconfigure orderoutfood.com to their tastes. = Layer would be a=20 shopping cart layer, a restaurant selection layer, a menu selection = layer, a product review layer, etc. Eventually, this layers will be = docking to allow smoother connections; however, write now having them = "float" is fine. Currently, I have this code to create a layer; = however, how do I add a listener to detect after a drag was performed. = The reason I need to do this is so that I can update a cookie with the = layer's name/position so they can be read back when the user loads. = Eventually, a database will be tied to this and when you "lock the = layers" it'll open a popup-window, contact the server, and store your = preferences with requiring a new page load. However, for now, cookies = will work fine. Any idea how to detect a stopDragEvent type event with = DynAPI, or has one not been implemented yet. ---snip--- <html> <body bgcolor=3D#000000 text=3D#ffffff> <title>reconfigurable website</title> =20 <script language=3D"JavaScript" src=3D"../src/dynapi.js"></script> <script language=3D"Javascript"> dynapi.library.setPath('../src/dynapi/'); dynapi.library.include('dynapi.api'); dynapi.library.include('DragEvent'); </script> =20 <script language=3D"Javascript"> =20 DynAPI.onLoad(function() { =20 block =3D new DynLayer(); block.setSize(300,300); block.setLocation(100,100); block.setBgColor("red"); DragEvent.enableDragEvents(block); block.setHTML("<table cellspacing=3D0 cellpadding=3D0 = width=3D100%><tr><td bgcolor=3Dyellow width=3D100%><p align=3Dright><a = href=3D\"javascript:block._remove();\"><img src=3Dbx.gif = border=3D0></a></p></td></tr><tr><td>This is an example = layer.</td></tr></table>"); =20 DynAPI.document.addChild(block); }); =20 //--> </script> =20 <p align=3Dright><a = href=3D"javascript:DragEvent.disableDragEvents(block);">lock = layers</a><a = href=3D"javascript:DragEvent.enableDragEvents(block);">unlock = layers</a></p> =20 </html> ---snip--- Regards,=20 Art Dardia=20 _____________________________________________ Computer Science and Computer & Systems Engineering Rensselaer Polytechnic Institute 284 Pawling Ave., Troy, NY 12180 USA=20 phone: (518) 271-6521 :: cell: (973) 626-6819 =20 |