feisishui / birdeye

Automatically exported from code.google.com/p/birdeye
0 stars 0 forks source link

Node Labels not showing in revision 1822 of ravis #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Project in attached zip file does not render the node labels and the same 
application rendered labels correctly in previous version of ravis.

What is the expected output? What do you see instead?
Graph renders with no node labels in the graph.

What version of the product are you using? On what operating system?
Library built and/or released with svn revision 1822.

I have attached a patch that makes the labels render, but this does not seem to 
be the proper solution.  I am fairly new to flex and am not 100% sure what the 
correct solution would be.  I can think of plenty of incorrect solutions :-P

Line 329-331 of EnhancedVisualGraph is as follows

            if((_nodeLabelRendererFactory != null) && 
                (vn is IEnhancedVisualNode) && 
                (_edgeRendererFactory is IControllableEdgeRenderer)) {

To the best of my knowledge _edgeRendererFactory is of type IFactory and will 
never be a IControllableEdgeRenderer.

Removing this check makes the labels render, but I am assuming this validation 
was added for a legitimate reason.  An instance could be created from the 
factory and that could be checked against IControllableEdgeRenderer but that 
seems to not be the correct solution.

Anyway, I attached a patch with that line removed.  Applying it will make the 
labels render but removes the validation.

Original issue reported on code.google.com by Jebad...@gmail.com on 22 Feb 2011 at 2:17

Attachments:

GoogleCodeExporter commented 9 years ago
You are right, I changed the code to:

if((_nodeLabelRendererFactory != null) && 
                (vn is IEnhancedVisualNode) && 
                (_edgeRendererFactory.newInstance() is IControllableEdgeRenderer))

Can you please take the latest SVN commit and try that out for me.

Original comment by wasbri...@gmail.com on 25 Feb 2011 at 6:30

GoogleCodeExporter commented 9 years ago
Yes this seems to have resolved the issue.
Thanks for the quick turn around.

Original comment by Jebad...@gmail.com on 28 Feb 2011 at 3:38