--- a/server/python/django/renkanmanager/utils.py Tue Sep 23 10:40:40 2014 +0200
+++ b/server/python/django/renkanmanager/utils.py Thu Sep 25 12:16:00 2014 +0200
@@ -60,7 +60,10 @@
order, nb = nb
offset = float(self.max_length - nb) / 2
for i in xrange(nb):
- self.cat_nb_nodes[c].append({ "x": order*500, "y": 100*(i+offset) })
+ if c=="northwest":
+ self.cat_nb_nodes[c].append({ "x": order*500, "y": offset })
+ else:
+ self.cat_nb_nodes[c].append({ "x": order*500, "y": 100*(i+offset) })
@@ -77,7 +80,10 @@
for i in xrange(nb):
radius = (order*500) if order>0 else 100
angle = 2 * math.pi * i / nb
- self.cat_nb_nodes[c].append({ "x": radius*math.cos(angle), "y": radius*math.sin(angle) })
+ if c=="northwest":
+ self.cat_nb_nodes[c].append({ "x": -radius, "y": -radius })
+ else:
+ self.cat_nb_nodes[c].append({ "x": radius*math.cos(angle), "y": radius*math.sin(angle) })