<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Event Delegation based DHTML Drag and Drop?</title>
	<atom:link href="http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop/feed" rel="self" type="application/rss+xml" />
	<link>http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop</link>
	<description>It's all spinning wheels and self-doubt until the first pot of coffee.</description>
	<lastBuildDate>Thu, 11 Mar 2010 12:23:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<item>
		<title>By: Batiste</title>
		<link>http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop/comment-page-1#comment-384686</link>
		<dc:creator>Batiste</dc:creator>
		<pubDate>Tue, 20 Jan 2009 10:06:54 +0000</pubDate>
		<guid isPermaLink="false">http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop#comment-384686</guid>
		<description>&lt;p&gt;A jQuery solution for Drag and Drop with event delegation :&lt;/p&gt;

&lt;p&gt;http://batiste.dosimple.ch/blog/posts/2008-05-18-1/jquery-drag-and-drop-and-resize-event-delegation.html&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>A jQuery solution for Drag and Drop with event delegation :</p>
<p><a href="http://batiste.dosimple.ch/blog/posts/2008-05-18-1/jquery-drag-and-drop-and-resize-event-delegation.html" rel="nofollow">http://batiste.dosimple.ch/blog/posts/2008-05-18-1/jquery-drag-and-drop-and-resize-event-delegation.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Meyer</title>
		<link>http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop/comment-page-1#comment-356104</link>
		<dc:creator>Justin Meyer</dc:creator>
		<pubDate>Sat, 31 May 2008 07:43:52 +0000</pubDate>
		<guid isPermaLink="false">http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop#comment-356104</guid>
		<description>&lt;p&gt;I am working on the exact same issue for JavaScriptMVC.  If you haven&#039;t seen JavaScriptMVC, check out its trunk.  In the controller2 plugin, you&#039;ll find a really nice event delegation library.&lt;/p&gt;

&lt;p&gt;I&#039;ve only thought of 1 way to do event delegation drops.  It&#039;s crazy, but it might work.&lt;/p&gt;

&lt;p&gt;First, style Drags so their z-Index is LOWER than the Drops.  You want your mouse to hit the droppable areas.&lt;/p&gt;

&lt;p&gt;Once a droppable is moused over by dragging a drag to it, it creates a transparent element in the exact same position as the Droppable.  It also lowers the droppable z-Index.  This gives the appearance that the draggable is over the droppable.&lt;/p&gt;

&lt;p&gt;To simulate movement, the transparent droppable&#039;s mouseovers are sent to the draggable.&lt;/p&gt;

&lt;p&gt;On mousing out of the transparent Droppable, it sets everything back to normal.&lt;/p&gt;

&lt;p&gt;I haven&#039;t tried this yet.  The biggest issue I see is that when you grab a draggable in the middle, half of it will be behind the droppable until the mouseover happens.  This isn&#039;t ideal, but maybe there is something that can be done about that.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I am working on the exact same issue for JavaScriptMVC.  If you haven&#8217;t seen JavaScriptMVC, check out its trunk.  In the controller2 plugin, you&#8217;ll find a really nice event delegation library.</p>
<p>I&#8217;ve only thought of 1 way to do event delegation drops.  It&#8217;s crazy, but it might work.</p>
<p>First, style Drags so their z-Index is LOWER than the Drops.  You want your mouse to hit the droppable areas.</p>
<p>Once a droppable is moused over by dragging a drag to it, it creates a transparent element in the exact same position as the Droppable.  It also lowers the droppable z-Index.  This gives the appearance that the draggable is over the droppable.</p>
<p>To simulate movement, the transparent droppable&#8217;s mouseovers are sent to the draggable.</p>
<p>On mousing out of the transparent Droppable, it sets everything back to normal.</p>
<p>I haven&#8217;t tried this yet.  The biggest issue I see is that when you grab a draggable in the middle, half of it will be behind the droppable until the mouseover happens.  This isn&#8217;t ideal, but maybe there is something that can be done about that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: misuba</title>
		<link>http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop/comment-page-1#comment-47648</link>
		<dc:creator>misuba</dc:creator>
		<pubDate>Mon, 06 Nov 2006 22:26:55 +0000</pubDate>
		<guid isPermaLink="false">http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop#comment-47648</guid>
		<description>&lt;p&gt;I&#039;m interested to see your approach. (FWIW, Proto hasn&#039;t touched Object.prototype for a couple of versions now.)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;m interested to see your approach. (FWIW, Proto hasn&#8217;t touched Object.prototype for a couple of versions now.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: l.m.orchard</title>
		<link>http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop/comment-page-1#comment-47593</link>
		<dc:creator>l.m.orchard</dc:creator>
		<pubDate>Mon, 06 Nov 2006 19:06:03 +0000</pubDate>
		<guid isPermaLink="false">http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop#comment-47593</guid>
		<description>&lt;p&gt;misuba: Nope, the Scriptaculous approach gives me problems too.  The first is that I don&#039;t like Prototype, unless they&#039;ve stopped messing with Object.prototype since I last checked.  The second is that DnD in Scriptaculous involves juggling lots of little objects ilke most other DnD implementations I&#039;ve found.  When I have an outline of 100&#039;s to 1000&#039;s of items, that really blows.  I think I&#039;ve got an approach working now that&#039;s significantly lighter weight.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>misuba: Nope, the Scriptaculous approach gives me problems too.  The first is that I don&#8217;t like Prototype, unless they&#8217;ve stopped messing with Object.prototype since I last checked.  The second is that DnD in Scriptaculous involves juggling lots of little objects ilke most other DnD implementations I&#8217;ve found.  When I have an outline of 100&#8217;s to 1000&#8217;s of items, that really blows.  I think I&#8217;ve got an approach working now that&#8217;s significantly lighter weight.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: misuba</title>
		<link>http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop/comment-page-1#comment-47388</link>
		<dc:creator>misuba</dc:creator>
		<pubDate>Mon, 06 Nov 2006 02:40:19 +0000</pubDate>
		<guid isPermaLink="false">http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop#comment-47388</guid>
		<description>&lt;p&gt;I think the dragdrop stuff in scriptaculous would get you most of this... at least, it is good about draggable elements having handles you can specify (e.g. child elements of the thing you want to drag), and flexible about what sorts of targets you can land on.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I think the dragdrop stuff in scriptaculous would get you most of this&#8230; at least, it is good about draggable elements having handles you can specify (e.g. child elements of the thing you want to drag), and flexible about what sorts of targets you can land on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop/comment-page-1#comment-46407</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 02 Nov 2006 13:10:53 +0000</pubDate>
		<guid isPermaLink="false">http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop#comment-46407</guid>
		<description>&lt;p&gt;I presume the problem is that, given a point on the screen, you want to find exactly what DOM element is beneath it.&lt;/p&gt;

&lt;p&gt;I found a solution for this in my proof-of-concept structured editor http://www.fluffy.co.uk/stediting/ -- you need to know where the mouse was clicked to insert the caret.&lt;/p&gt;

&lt;p&gt;It might be a start anyway.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I presume the problem is that, given a point on the screen, you want to find exactly what DOM element is beneath it.</p>
<p>I found a solution for this in my proof-of-concept structured editor <a href="http://www.fluffy.co.uk/stediting/" rel="nofollow">http://www.fluffy.co.uk/stediting/</a> &#8212; you need to know where the mouse was clicked to insert the caret.</p>
<p>It might be a start anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: l.m.orchard</title>
		<link>http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop/comment-page-1#comment-46251</link>
		<dc:creator>l.m.orchard</dc:creator>
		<pubDate>Wed, 01 Nov 2006 19:18:52 +0000</pubDate>
		<guid isPermaLink="false">http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop#comment-46251</guid>
		<description>&lt;p&gt;Gareth: Yup, the issue I have with the mouseUp is that getTarget gives me what was under the mouse when I let go of the button - namely, the element I&#039;ve been dragging around, not the element under the thing being dragged.  In addition, for user feedback &lt;em&gt;during&lt;/em&gt; the drag (ie. at mouseMove time), I want to know what&#039;s under the dragged element - so I can highlight the potential landing spot, etc.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Gareth: Yup, the issue I have with the mouseUp is that getTarget gives me what was under the mouse when I let go of the button &#8211; namely, the element I&#8217;ve been dragging around, not the element under the thing being dragged.  In addition, for user feedback <em>during</em> the drag (ie. at mouseMove time), I want to know what&#8217;s under the dragged element &#8211; so I can highlight the potential landing spot, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gareth Andrew</title>
		<link>http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop/comment-page-1#comment-46246</link>
		<dc:creator>Gareth Andrew</dc:creator>
		<pubDate>Wed, 01 Nov 2006 18:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop#comment-46246</guid>
		<description>&lt;p&gt;I&#039;m sure I&#039;ve missed something obvious - why can&#039;t you simply use the same event delegation approach on the mouseUp event?  getTarget should return the node you&#039;ve dropped on, what else do you need?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;m sure I&#8217;ve missed something obvious &#8211; why can&#8217;t you simply use the same event delegation approach on the mouseUp event?  getTarget should return the node you&#8217;ve dropped on, what else do you need?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop/comment-page-1#comment-46013</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Wed, 01 Nov 2006 00:19:27 +0000</pubDate>
		<guid isPermaLink="false">http://decafbad.com/blog/2006/10/31/event-delegation-based-dhtml-drag-and-drop#comment-46013</guid>
		<description>&lt;p&gt;You know, Marty and I were talking tonight about how some of your posts make NO sense to us.  She even said &quot;it&#039;s like he&#039;s talking another fucking language&quot;.&lt;/p&gt;

&lt;p&gt;Damn Programmers!!&lt;/p&gt;

&lt;p&gt;--nick&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>You know, Marty and I were talking tonight about how some of your posts make NO sense to us.  She even said &#8220;it&#8217;s like he&#8217;s talking another fucking language&#8221;.</p>
<p>Damn Programmers!!</p>
<p>&#8211;nick</p>
]]></content:encoded>
	</item>
</channel>
</rss>
