Author: michiel
Date: 2009-11-19 00:22:28 +0100 (Thu, 19 Nov 2009)
New Revision: 39797
Modified:
mmbase/trunk/base-webapp/src/main/webapp/mmbase/components/core/model.svg.jsp
Log:
Modified:
mmbase/trunk/base-webapp/src/main/webapp/mmbase/components/core/model.svg.jsp
===================================================================
---
mmbase/trunk/base-webapp/src/main/webapp/mmbase/components/core/model.svg.jsp
2009-11-18 22:37:20 UTC (rev 39796)
+++
mmbase/trunk/base-webapp/src/main/webapp/mmbase/components/core/model.svg.jsp
2009-11-18 23:22:28 UTC (rev 39797)
@@ -24,15 +24,22 @@
//out.println("root=" + nodemanager + ";");
int size = -1;
int distance = 1;
- while (size < set.size() && distance <= maxdistance) {
+ while (size < set.size()) {
size = set.size();
Set<String> add = new HashSet<String>();
for (RelationManager rm : cloud.getRelationManagers()) {
try {
- if (set.containsKey(rm.getSourceManager().getName()) ||
set.containsKey(rm.getDestinationManager().getName()) || nodemanager.size() ==
0) {
- add.add(rm.getSourceManager().getName());
- add.add(rm.getDestinationManager().getName());
- rmset.add(rm);
+ if (distance > maxdistance) {
+ if (set.containsKey(rm.getSourceManager().getName()) &&
set.containsKey(rm.getDestinationManager().getName()) || nodemanager.size() ==
0) {
+ rmset.add(rm);
+ }
+ } else {
+ if (set.containsKey(rm.getSourceManager().getName()) ||
set.containsKey(rm.getDestinationManager().getName()) || nodemanager.size() ==
0) {
+ rmset.add(rm);
+ add.add(rm.getSourceManager().getName());
+ add.add(rm.getDestinationManager().getName());
+
+ }
}
} catch (NotFoundException nfe) {
}
@@ -43,20 +50,20 @@
}
}
distance++;
-
}
for (Map.Entry<String, Integer> entry : set.entrySet()) {
String nm = entry.getKey();
int dist = entry.getValue();
String color ;
if (dist == 0) {
- color = "color=green,fontcolor=green,";
+ color = ",color=green,fontcolor=green";
} else if (dist == maxdistance) {
- color = "color=lightgray,fontcolor=gray,";
+ color = ",color=lightgray,fontcolor=gray";
} else {
color = "";
}
- out.println(nm + " [label=<" + nm + ">," + color + "URL=\"" + url +
"?nodemanager=" + nm + "&maxdistance=" + maxdistance + "\"];");
+ String u = url + "?nodemanager=" + nm + "&maxdistance=" +
maxdistance;
+ out.println(nm + " [label=<" + nm + ">" + color + ",URL=\"" + u +
"\"];");
}
%>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs