aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheather <unknown>2011-05-06 17:17:46 -0400
committerheather <unknown>2011-05-06 17:17:46 -0400
commit2ee96241f90c01b30bf5a0a86113c2ea18b94e92 (patch)
tree531c56ac6844922083b42db4fb456499fca4552b
parentcf5096f5b247e3689c58cab230ef53e00f66c184 (diff)
downloadd2-2ee96241f90c01b30bf5a0a86113c2ea18b94e92.tar.bz2
d2-2ee96241f90c01b30bf5a0a86113c2ea18b94e92.tar.xz
d2-2ee96241f90c01b30bf5a0a86113c2ea18b94e92.zip
having name label directly coming from svg_text controller
-rw-r--r--lib/d2/bin/d2_svg_processor.py10
-rw-r--r--templates/index.html2
2 files changed, 2 insertions, 10 deletions
diff --git a/lib/d2/bin/d2_svg_processor.py b/lib/d2/bin/d2_svg_processor.py
index 9c8cd70..b5bb2aa 100644
--- a/lib/d2/bin/d2_svg_processor.py
+++ b/lib/d2/bin/d2_svg_processor.py
@@ -318,7 +318,6 @@ class CreateStructureSVG(object):
318class PopulateTables(object): 318class PopulateTables(object):
319 319
320 OUTPUT_NTWK_ID_FILENAME = 'ntwk_id.svg' 320 OUTPUT_NTWK_ID_FILENAME = 'ntwk_id.svg'
321 OUTPUT_NAME_LABEL_FILENAME = 'name_label.svg'
322 OUTPUT_JSON_FILENAME = 'ntwk_number_data.json' 321 OUTPUT_JSON_FILENAME = 'ntwk_number_data.json'
323 TABLES = [u'forge', u'label_coordinate', u'plot'] 322 TABLES = [u'forge', u'label_coordinate', u'plot']
324 323
@@ -801,14 +800,7 @@ class PopulateTables(object):
801 with open(output_json_filepath, 'wb') as output_json_fileobj: 800 with open(output_json_filepath, 'wb') as output_json_fileobj:
802 output_json_fileobj.write(json.dumps(ntwk_number_data)) 801 output_json_fileobj.write(json.dumps(ntwk_number_data))
803 802
804 output_name_label_filepath = os.path.join( 803 self._get_name_label_svg()
805 args.output_directory,
806 args.project + '_' + \
807 self.OUTPUT_NAME_LABEL_FILENAME)
808 with open(output_name_label_filepath, 'wb') as \
809 output_name_label_fileobj:
810 output_name_label_fileobj.write(self._get_name_label_svg())
811
812 804
813class Util(object): 805class Util(object):
814 806
diff --git a/templates/index.html b/templates/index.html
index 86d1bac..1085451 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -60,7 +60,7 @@
60 60
61 var name_label = new OpenLayers.Layer.ScalableInlineXhtml( 61 var name_label = new OpenLayers.Layer.ScalableInlineXhtml(
62 "Name Labels", 62 "Name Labels",
63 "/static/svgs/d2_name_label.svg", 63 "/svg_text/{{plots[0].map.id}}",
64 ext, 64 ext,
65 size, 65 size,
66 {isBaseLayer: false} 66 {isBaseLayer: false}