Not necessarily.  If I drag the selection box to include both boxes, I
do want both of them.  What confuses the users is selecting only the
smaller box and ending up with both of them.  In this case, yes, I'd
want the last one in the list, but I can't programmatically determine
what the user selected versus which elements the box actually
intersects.

I hope this makes sense; pictures would be helpful if they could be
posted.

Michael Bishop

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Joel Uckelman
Sent: Wednesday, December 13, 2006 9:53 AM
To: [email protected]
Subject: Re: Multiple Select - Part II? 

Thus spake "Bishop, Michael W. CONTR J9C880":
> ------_=_NextPart_001_01C71EC4.3078A3B7
> Content-Type: text/plain;
>       charset="us-ascii"
> Content-Transfer-Encoding: quoted-printable
> 
> Much earlier on this mailing list, I asked how to do a multiple select
> on the JSVGCanvas.  You draw a rectangle and every element that
> intersects the rectangle is selected.  Using
> SVGDocument.getRootElement().getIntersectionList(...) works well, but
I
> do have one bug I'm trying to solve.
> 
> =20
> 
> Imagine the case where you have a box that's 20x20.  On top of that
box
> (Z order), you have another 10x10 box.  If you drag the selection box
> inside the 10x10 box, the 20x20 box is also selected.  In other words,
> the Z order is not taken into account.  Using strictly X and Y, the
> selection box does intersect both boxes.
> 
> =20
> 
> The case below illustrates the problem; drawing a selection box in the
> blue box also selects the red box.  Is there a way to avoid this?  I
> don't want the selection to automatically "drill down", I just want to
> grab what I see the selection box touch.
> 
> =20
> 
> Michael Bishop
> 
> =20

Isn't the list returned already sorted in z-order? (If not, you could
sort it.) What you want is the last element from the list, right?

-- 
J.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to