Author: clopes
Date: 2011-10-20 14:19:32 -0700 (Thu, 20 Oct 2011)
New Revision: 27249
Modified:
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/GraphMediator.as
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/render/CompoundNodeRenderer.as
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/render/NodeRenderer.as
Log:
Fixed issue with hidden compound node labels appearing after filtering elements.
Modified:
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/GraphMediator.as
===================================================================
--- cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/GraphMediator.as
2011-10-20 20:24:30 UTC (rev 27248)
+++ cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/GraphMediator.as
2011-10-20 21:19:32 UTC (rev 27249)
@@ -291,7 +291,9 @@
// it is also required to operate compound node labeler, to update
// compound node labels
- vis.compoundNodeLabeler.operate();
+ if (configProxy.nodeLabelsVisible) {
+ vis.compoundNodeLabeler.operate();
+ }
}
public function resetDataSprite(ds:DataSprite):void {
Modified:
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/render/CompoundNodeRenderer.as
===================================================================
---
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/render/CompoundNodeRenderer.as
2011-10-20 20:24:30 UTC (rev 27248)
+++
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/render/CompoundNodeRenderer.as
2011-10-20 21:19:32 UTC (rev 27249)
@@ -110,6 +110,9 @@
// to the front, otherwise they remain on the
back side of
// the compound node.
GraphUtils.bringToFront(ns);
+ // prevent gaps between this node and its edges
+ updateEdges(ns);
+
} else {
// if the data sprite is not a compound node,
then just call
// the superclass renderer function.
Modified:
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/render/NodeRenderer.as
===================================================================
---
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/render/NodeRenderer.as
2011-10-20 20:24:30 UTC (rev 27248)
+++
cytoscapeweb/trunk/cytoscapeweb/src/org/cytoscapeweb/view/render/NodeRenderer.as
2011-10-20 21:19:32 UTC (rev 27249)
@@ -158,12 +158,8 @@
// 2. Draw an image on top:
drawImage(d, w, h);
- // To prevent gaps between the node and its edges when the
node has the
- // border width changed on mouseover or selection
- NodeSprite(d).visitEdges(function(e:EdgeSprite):Boolean {
- e.dirty();
- return false;
- }, NodeSprite.GRAPH_LINKS);
+ updateEdges(d as NodeSprite);
+
} catch (err:Error) {
error(new CWError("Error rendering Node '" + d.data.id +"': "
+ err.message,
ErrorCodes.RENDERING_ERROR));
@@ -249,5 +245,14 @@
}
}
}
+
+ protected function updateEdges(n:NodeSprite):void {
+ // To prevent gaps between the node and its edges when the node
has the
+ // border width changed on mouseover or selection
+ n.visitEdges(function(e:EdgeSprite):Boolean {
+ e.dirty();
+ return false;
+ }, NodeSprite.GRAPH_LINKS);
+ }
}
}
--
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.