diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2016-08-30 16:27:31 +0200 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2016-09-12 12:15:00 -0600 |
commit | eeea99b45c0a0dccd935dc5203b71e0adf1430fe (patch) | |
tree | 5cac0682d380c04ec323f98ab8f2df36e45e03bd /grc/gui/Element.py | |
parent | eb6033357a2ca8db17c4fd2cfd6f1bf789e40330 (diff) |
grc: gtk3: calculate flowgraph canvas size
Diffstat (limited to 'grc/gui/Element.py')
-rw-r--r-- | grc/gui/Element.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/grc/gui/Element.py b/grc/gui/Element.py index 8418bef0cc..17cd6ddd92 100644 --- a/grc/gui/Element.py +++ b/grc/gui/Element.py @@ -168,6 +168,15 @@ class Element(object): if x <= x1 <= x_m and y <= y1 <= y_m: return self + @property + def extend(self): + x_min, y_min = x_max, y_max = self.coordinate + x_min += min(x for x, y in self._bounding_points) + y_min += min(y for x, y in self._bounding_points) + x_max += max(x for x, y in self._bounding_points) + y_max += max(y for x, y in self._bounding_points) + return x_min, y_min, x_max, y_max + def mouse_over(self): pass |