Author: clopes
Date: 2011-10-18 10:25:18 -0700 (Tue, 18 Oct 2011)
New Revision: 27215

Modified:
   cytoscapeweb/branches/compound/html-template/js/cytoscapeweb.js
   
cytoscapeweb/branches/compound/src/org/cytoscapeweb/controller/HandleDragCommand.as
Log:
Wrote dragstart/dragstop API doc.
Fixed dragstart/dragstop event handler to interpret Groups.NONE as NODES.

Modified: cytoscapeweb/branches/compound/html-template/js/cytoscapeweb.js
===================================================================
--- cytoscapeweb/branches/compound/html-template/js/cytoscapeweb.js     
2011-10-18 17:15:29 UTC (rev 27214)
+++ cytoscapeweb/branches/compound/html-template/js/cytoscapeweb.js     
2011-10-18 17:25:18 UTC (rev 27215)
@@ -2060,6 +2060,16 @@
      *     <tr><td><code>edges</code></td><td>{@link 
org.cytoscapeweb.Edge}</td><td><code>undefined</code></td></tr>
      *     <tr><td><code>none</code>: double-clicking the visualization 
background</td><td><code>undefined</code></td><td><code>undefined</code></td></tr>
      * </Table>
+     * <p><label><strong>dragstart:</strong></label> Fired when the user 
starts dragging a node.</p>
+     * <table>
+     *     <tr><th>group</th><th>target</th><th>value</th></tr>
+     *     <tr><td><code>nodes</code></td><td>{@link 
org.cytoscapeweb.Node}</td><td><code>undefined</code></td></tr>
+     * </Table>
+     * <p><label><strong>dragstop:</strong></label> Fired when the user stops 
dragging a node.</p>
+     * <table>
+     *     <tr><th>group</th><th>target</th><th>value</th></tr>
+     *     <tr><td><code>nodes</code></td><td>{@link 
org.cytoscapeweb.Node}</td><td><code>undefined</code></td></tr>
+     * </Table>
      * <p><label><strong>mouseover:</strong></label> Fired when the user moves 
the mouse over an element that belongs to the <code>group</code> you 
registered. 
      * If you don't specify any group or if the group is <code>none</code>, 
the event will be fired any time the cursor enters the visualization 
rectangle.</p>
      * <table>
@@ -3222,8 +3232,11 @@
      * ({@link org.cytoscapeweb.Visualization#addListener}, {@link 
org.cytoscapeweb.Visualization#hasListener} and
      * {@link org.cytoscapeweb.Visualization#removeListener}).</p>
      * <p>Its value must be one of:</p>
-     *     <ul class="options"><li><code>click</code>:</strong> For mouse 
click events on nodes, edges or the visualization background.</li>
+     *     <ul class="options">
+     *         <li><code>click</code>:</strong> For mouse click events on 
nodes, edges or the visualization background.</li>
      *         <li><code>dblclick</code>:</strong> For double-click events on 
nodes, edges or the visualization background.</li>
+     *         <li><code>dragstart</code>:</strong> For drag-start events on 
nodes.</li>
+     *         <li><code>dragstop</code>:</strong> For drag-stop events on 
nodes.</li>
      *         <li><code>mouseover</code>:</strong> For mouse-over events on 
nodes, edges or the visualization background.</li>
      *         <li><code>mouseout</code>:</strong> For mouse-out events on 
nodes, edges or the visualization background.</li>
      *         <li><code>select</code>:</strong> For events dispatched after 
nodes or edges are selected (e.g. by direct mouse clicking or by 
drag-selecting).</li>

Modified: 
cytoscapeweb/branches/compound/src/org/cytoscapeweb/controller/HandleDragCommand.as
===================================================================
--- 
cytoscapeweb/branches/compound/src/org/cytoscapeweb/controller/HandleDragCommand.as
 2011-10-18 17:15:29 UTC (rev 27214)
+++ 
cytoscapeweb/branches/compound/src/org/cytoscapeweb/controller/HandleDragCommand.as
 2011-10-18 17:25:18 UTC (rev 27215)
@@ -57,9 +57,10 @@
             var type:String = "drag";
             if (action === ApplicationFacade.DRAG_START_EVENT) type = 
"dragstart";
             else if (action === ApplicationFacade.DRAG_STOP_EVENT) type = 
"dragstop";
-            trace(type);
+            
             // Call external listener:            
-            if (extMediator.hasListener(type, group)) {
+            if (extMediator.hasListener(type, group) || 
+                extMediator.hasListener(type, Groups.NONE)) {
                 var target:Object = ExternalObjectConverter.toExtElement(ds, 
graphProxy.zoom);
                 
                 body = { functionName: ExternalFunctions.INVOKE_LISTENERS, 

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to