[html5] r3249 - [e] (0) v2 notes for dnd

whatwg at whatwg.org whatwg at whatwg.org
Sun Jun 14 17:42:36 PDT 2009


Author: ianh
Date: 2009-06-14 17:42:34 -0700 (Sun, 14 Jun 2009)
New Revision: 3249

Modified:
   index
   source
Log:
[e] (0) v2 notes for dnd

Modified: index
===================================================================
--- index	2009-06-15 00:36:15 UTC (rev 3248)
+++ index	2009-06-15 00:42:34 UTC (rev 3249)
@@ -54698,31 +54698,43 @@
 
   <h3 id=dnd><span class=secno>7.10 </span><dfn>Drag and drop</dfn></h3>
 
-<!--XXX
+<!-- v2 ideas for drag and drop:
 
-http://msdn.microsoft.com/workshop/author/datatransfer/overview.asp
-http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/clipboarddata.asp
+     * being able to animate a drop target:
 
-> To implement this with simple interface I've proposed, events should be
-> handled either by existing elements (like list items that compare their size
-> and position of dragged element to decide whether element should be dropped
-> before or after) or handled by container that would probably need to calculate
-> positions of it's children and create new element to show drop target. Smooth
-> Mac-like drag'n'drop can be implemented by animating drop target's
-> padding/margin. So that's quite a bit of code that's going to be reinvented
-> each time someone implements reordering.
+       > To implement this with simple interface I've proposed, events
+       > should be handled either by existing elements (like list
+       > items that compare their size and position of dragged element
+       > to decide whether element should be dropped before or after)
+       > or handled by container that would probably need to calculate
+       > positions of it's children and create new element to show
+       > drop target. Smooth Mac-like drag'n'drop can be implemented
+       > by animating drop target's padding/margin. So that's quite a
+       > bit of code that's going to be reinvented each time someone
+       > implements reordering.
 
-<hyatt> :droptarget
-<hyatt> or something
-<hyatt> we don't support a pseudo-class for the drop target but that's a great idea
-<Hixie_> yeah, thinking about that too
-<Hixie_> :drop-target, :drop-target(above), :drop-target(below) and having ondragover be able to say "not on me, but next to me maybe"
+       <hyatt> :droptarget
+       <hyatt> or something
+       <hyatt> we don't support a pseudo-class for the drop target but that's a great idea
+       <Hixie_> yeah, thinking about that too
+       <Hixie_> :drop-target, :drop-target(above), :drop-target(below) and having ondragover be able to say "not on me, but next to me maybe"
 
-http://msdn.microsoft.com/workshop/author/dhtml/reference/events/ondragstart.asp
-http://msdn.microsoft.com/workshop/author/dhtml/reference/events/ondrag.asp
-http://msdn.microsoft.com/workshop/author/dhtml/reference/events/ondragend.asp
-http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_datatransfer.asp
-http://developer.apple.com/documentation/AppleApplications/Conceptual/SafariJSProgTopics/Tasks/DragAndDrop.html
+     * We should let drop targets communicate back to drag sources if
+       they want to communicate. (e.g. expose Window, and thus
+       postMessage(), on the dataTransfer object on drop.)
+
+       We should let drag sources provide a set of options via a
+       context menu when the drop happens. (So that, e.g., the source
+       can know whether a capabilities URI that it is passing along is
+       supposed to be read-write access or read-only access to the
+       object being dragged.)
+
+       We should let potential drop targets see the types (but not the
+       contents!) of dragged data so they can establish if they care
+       or not. (dataTransfer.hasType())
+
+       Ack: Ben Laurie (@g)
+
 -->
 
   <p>This section defines an event-based drag-and-drop mechanism.</p>

Modified: source
===================================================================
--- source	2009-06-15 00:36:15 UTC (rev 3248)
+++ source	2009-06-15 00:42:34 UTC (rev 3249)
@@ -64056,31 +64056,43 @@
 
   <h3 id="dnd"><dfn>Drag and drop</dfn></h3>
 
-<!--XXX
+<!-- v2 ideas for drag and drop:
 
-http://msdn.microsoft.com/workshop/author/datatransfer/overview.asp
-http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/clipboarddata.asp
+     * being able to animate a drop target:
 
-> To implement this with simple interface I've proposed, events should be
-> handled either by existing elements (like list items that compare their size
-> and position of dragged element to decide whether element should be dropped
-> before or after) or handled by container that would probably need to calculate
-> positions of it's children and create new element to show drop target. Smooth
-> Mac-like drag'n'drop can be implemented by animating drop target's
-> padding/margin. So that's quite a bit of code that's going to be reinvented
-> each time someone implements reordering.
+       > To implement this with simple interface I've proposed, events
+       > should be handled either by existing elements (like list
+       > items that compare their size and position of dragged element
+       > to decide whether element should be dropped before or after)
+       > or handled by container that would probably need to calculate
+       > positions of it's children and create new element to show
+       > drop target. Smooth Mac-like drag'n'drop can be implemented
+       > by animating drop target's padding/margin. So that's quite a
+       > bit of code that's going to be reinvented each time someone
+       > implements reordering.
 
-<hyatt> :droptarget
-<hyatt> or something
-<hyatt> we don't support a pseudo-class for the drop target but that's a great idea
-<Hixie_> yeah, thinking about that too
-<Hixie_> :drop-target, :drop-target(above), :drop-target(below) and having ondragover be able to say "not on me, but next to me maybe"
+       <hyatt> :droptarget
+       <hyatt> or something
+       <hyatt> we don't support a pseudo-class for the drop target but that's a great idea
+       <Hixie_> yeah, thinking about that too
+       <Hixie_> :drop-target, :drop-target(above), :drop-target(below) and having ondragover be able to say "not on me, but next to me maybe"
 
-http://msdn.microsoft.com/workshop/author/dhtml/reference/events/ondragstart.asp
-http://msdn.microsoft.com/workshop/author/dhtml/reference/events/ondrag.asp
-http://msdn.microsoft.com/workshop/author/dhtml/reference/events/ondragend.asp
-http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_datatransfer.asp
-http://developer.apple.com/documentation/AppleApplications/Conceptual/SafariJSProgTopics/Tasks/DragAndDrop.html
+     * We should let drop targets communicate back to drag sources if
+       they want to communicate. (e.g. expose Window, and thus
+       postMessage(), on the dataTransfer object on drop.)
+
+       We should let drag sources provide a set of options via a
+       context menu when the drop happens. (So that, e.g., the source
+       can know whether a capabilities URI that it is passing along is
+       supposed to be read-write access or read-only access to the
+       object being dragged.)
+
+       We should let potential drop targets see the types (but not the
+       contents!) of dragged data so they can establish if they care
+       or not. (dataTransfer.hasType())
+
+       Ack: Ben Laurie (@g)
+
 -->
 
   <p>This section defines an event-based drag-and-drop mechanism.</p>




More information about the Commit-Watchers mailing list