Is it possible to get more specificity than just the type of the object being dragged? For example, if I have red images and blue images, and a red target and a blue target, and I want to be able to drop red images only on the red target, and blue images only on the blue target, is there a good way to do this, other than globally keep track of which thing is being dragged?<br>
Thanks.<br><br>-Jason<br><br><div class="gmail_quote">On Mon, Aug 16, 2010 at 7:57 PM, Daniel Cheng <span dir="ltr"><<a href="mailto:dcheng@chromium.org">dcheng@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font face="arial,helvetica,sans-serif">I don't think anything in the spec should prevent that. dragenter handlers attached to different drop targets can check event.dataTransfer.types and decide if they want to accept the drag or not.</font><div>
<font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">That being said, do any operating systems actually support multiple concurrent drags and drops? WebKit has some built-in assumptions about there being no more than one drag-and-drop operation (per page possibly--I can't test, since I don't have access to a machine with multi-touch capabilities) and I would be surprised if many other applications didn't have this limitation as well.<br>
</font><div><div>
<div><font face="arial,helvetica,sans-serif"><br></font></div><div><font face="arial,helvetica,sans-serif">Daniel<br></font><div><div></div><div class="h5"><br><div class="gmail_quote">On Thu, Aug 12, 2010 at 16:26, Jason Gross <span dir="ltr"><<a href="mailto:jasongross9%2Bhtml5@gmail.com" target="_blank">jasongross9+html5@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><span style="font-family: arial,sans-serif; font-size: 13px; border-collapse: collapse;">Greetings,<div>
The specification says that the dragenter event is "used to determine whether or not the drop target is to accept the drop". Do functions bound to this event get any information about the object being dragged? In particular, is there a good way to have N drop targets, and have each of them accept only certain draggables? If not, it seems to me like a good feature to have, especially as multi-touch applications/devices become more prevalent.</div>
<div>Thanks.</div><div><br></div><div>Sincerely,</div><div>Jason Gross</div></span>
</blockquote></div><br></div></div></div></div>
</div></div>
</blockquote></div><br>