changeset 1518:80e055978461

Fix issue of showing selection box at wrong place for transition
author Thinker K.F. Li <thinker@codemud.net>
date Sat, 14 May 2011 12:20:57 +0800
parents 31a21656c0a8
children 74635b07a83a
files pyink/FSM_window.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pyink/FSM_window.py	Sat May 14 01:07:23 2011 +0800
+++ b/pyink/FSM_window.py	Sat May 14 12:20:57 2011 +0800
@@ -414,7 +414,13 @@
         pass
 
     def _translate_page_xy(self, x, y):
-        return x, y
+        doc = self._doc
+        root = doc.root()
+        page_h_txt = root.getAttribute('height')
+        page_h = float(page_h_txt)
+        svgx = x
+        svgy = page_h - y
+        return svgx, svgy
 
     @staticmethod
     def _update_graph(path, arrow_node, path_node):