Michael Pemberton wrote:
> If a layer is "hidden" behind another layer, it will never recieve the
> mouse events to trigger the drag event.
>
Well, not exactly. We have some larger images that we want to always
stay behind the smaller images even when the larger images are dragged.
Actually, I was able to do it by making two Drag objects and making the
start zIndex an argument of the Drag constructor (new Drag(zIndex)).
This allows me to have one Drag that exists, say over 200 and another
which exists at 100.
drag1=new Drag(200)
drag2=new Drag(100)
Then I made it such that a given drag object can alert another drag
object if its zIndex goes above 100 plus its set zIndex, it will shift
the alerted drag up 100. (So if you click on the background images and
they move towards the zIndeces of drag1, then drag1's zIndeces will be
moved up 100 to ensure that they stay in front.
drag2.setAlert(drag1)
When it is up I can post it to this list as an example.
--Gabe
> With regards to a feature of making a layer move to the top of the
> zIndex order, this already exists. There is an extension available that
> adds the methods bringToFront and sendToBack. These can be used at
> anytime to move a layer to the front / back of the zIndex order.
>
>> From: Gabriel J Zimmerman <[EMAIL PROTECTED]>
>> To: [EMAIL PROTECTED]
>> Subject: [Dynapi-Help] Using two drag objects in the same document.
>> Date: Thu, 24 Jan 2002 13:09:34 -0500
>>
>>
>> Hi,
>>
>> I am trying to create a drag and drop page, where there are two groups
>> of draggable objects, with all of the elements of one group always in
>> front of all the elements of another group.
>>
>> Also, I would like to create a method where you can click a link and it
>> will move a given object to the front of its group.
>>
>> Are there ways that these two things are generally done, and how might I
>> best modify the drag.js script to do this? I thought that if I used two
>> Drag objects and allowed the zIndex to be set dynamically, then I could
>> have two Drags with radically different zIndexes which would then force
>> one group to be on top of the other.
>>
>> Any thoughts?
>
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dynapi-help
>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help