|
|
@ -49,12 +49,13 @@ class PlaceVerticesFromFile(StyleAnnotator):
|
|
|
|
The filename is either given to the Annotator, or ./visualisation.visu is used."""
|
|
|
|
The filename is either given to the Annotator, or ./visualisation.visu is used."""
|
|
|
|
idempotent = False # The layout file could have changed, this is not covered by a TopologyV3
|
|
|
|
idempotent = False # The layout file could have changed, this is not covered by a TopologyV3
|
|
|
|
def __init__(self, filename):
|
|
|
|
def __init__(self, filename):
|
|
|
|
if filename is None:
|
|
|
|
|
|
|
|
filename = r'./visualisation.visu'
|
|
|
|
|
|
|
|
self.filename = filename
|
|
|
|
self.filename = filename
|
|
|
|
def annotate(self, topo):
|
|
|
|
def annotate(self, topo):
|
|
|
|
self.topo = topo
|
|
|
|
self.topo = topo
|
|
|
|
self.result = Annotation()
|
|
|
|
self.result = Annotation()
|
|
|
|
|
|
|
|
if self.filename is None:
|
|
|
|
|
|
|
|
self.result.for_topology = False
|
|
|
|
|
|
|
|
return self.result
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
with open(self.filename, 'r') as f:
|
|
|
|
with open(self.filename, 'r') as f:
|
|
|
|
positions = load(f)
|
|
|
|
positions = load(f)
|
|
|
|