Browse Source

Space elements a bit better with internal Object Diagrams visualizer

Yentl Van Tendeloo 7 years ago
parent
commit
de5f1380ac
2 changed files with 2 additions and 4 deletions
  1. 1 1
      classes/window/main_window.xml
  2. 1 3
      frontend.py

+ 1 - 1
classes/window/main_window.xml

@@ -1146,7 +1146,7 @@
                                             groups[element_id] = cs_elem_id
                                         else:
                                             # Add the group
-                                            x, y = self.locations.get(element_id, (30 + (group_counter * 150) % 1000, 30 + ((group_counter / 10) * 150)))
+                                            x, y = self.locations.get(element_id, (30 + (group_counter * 250) % 1000, 30 + ((group_counter / 4) * 250)))
                                             self.rendered.append({"id": str(group_counter), "type": "Group", "x": x, "y": y, "__asid": element_id})
                                             self.locations[element_id] = (x, y)
                                             group_id = str(group_counter)

+ 1 - 3
frontend.py

@@ -1,8 +1,6 @@
 """
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 
-Date:   Wed May 30 13:06:42 2018
-
 Model author: Yentl Van Tendeloo
 Model name:   Modelverse Visual Editor - Tkinter Version 
 Model description:
@@ -6842,7 +6840,7 @@ class MainWindow(RuntimeClassBase, tk.Toplevel, SCCDWidget):
                 groups[element_id] = cs_elem_id
             else:
                 # Add the group
-                x, y = self.locations.get(element_id, (30 + (group_counter * 150) % 1000, 30 + ((group_counter / 10) * 150)))
+                x, y = self.locations.get(element_id, (30 + (group_counter * 250) % 1000, 30 + ((group_counter / 4) * 250)))
                 self.rendered.append({"id": str(group_counter), "type": "Group", "x": x, "y": y, "__asid": element_id})
                 self.locations[element_id] = (x, y)
                 group_id = str(group_counter)