190 |
|
|
191 |
### Get the cs for center node |
### Get the cs for center node |
192 |
pl = self.getPlace(vs, paper2screen, 0,0, node, 0,0) |
pl = self.getPlace(vs, paper2screen, 0,0, node, 0,0) |
193 |
self.net.set(node, pl, 0) |
self.net.put(node, pl, 0) |
194 |
|
|
195 |
# If update interpolation help data only, if has moved |
# If update interpolation help data only, if has moved |
196 |
if self.current['centerNode'] != node: self.previous = self.current.copy() |
if self.current['centerNode'] != node: self.previous = self.current.copy() |
208 |
except ValueError: pass |
except ValueError: pass |
209 |
|
|
210 |
if len(links) == 0: |
if len(links) == 0: |
|
self.net.setDepth(node, 0) |
|
211 |
self.net.link(node, node) # XXX probably not the right way |
self.net.link(node, node) # XXX probably not the right way |
212 |
if len(links) > 0: |
if len(links) > 0: |
213 |
rotationAngle = 2*Math.PI / float(len(links)) |
rotationAngle = 2*Math.PI / float(len(links)) |
285 |
if self.net.getPlace(link) == None: |
if self.net.getPlace(link) == None: |
286 |
pl = self.getPlace(vs, into, x, y, link, startAngle+rotationAngle*i, depth) |
pl = self.getPlace(vs, into, x, y, link, startAngle+rotationAngle*i, depth) |
287 |
if dbg: p('new node', pl) |
if dbg: p('new node', pl) |
288 |
self.net.set(link, pl, depth) |
self.net.put(link, pl, depth) |
289 |
else: |
else: |
290 |
pl = self.net.getPlace(link) |
pl = self.net.getPlace(link) |
291 |
if dbg: p('old node', pl) |
if dbg: p('old node', pl) |