Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
78b95a53
Commit
78b95a53
authored
Nov 05, 2019
by
Maxime Perrotin
Browse files
Fix statecharts for Python3
parent
aafa5e9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
opengeode/Statechart.py
View file @
78b95a53
...
...
@@ -471,9 +471,9 @@ def render_statechart(scene, graphtree=None, keep_pos=False, dump_gfx=''):
# next to single, small states. Rule: there can't be a state with a size
# that is less than a third of the biggest state.
try
:
min_width
=
float
(
max
(
node
.
attr
.
get
(
'width'
,
0.0
)
or
0.0
min_width
=
float
(
max
(
float
(
node
.
attr
.
get
(
'width'
,
0.0
)
)
or
0.0
for
node
in
graphtree
[
'graph'
].
iternodes
()))
min_height
=
float
(
max
(
node
.
attr
.
get
(
'height'
,
0.0
)
or
0.0
min_height
=
float
(
max
(
float
(
node
.
attr
.
get
(
'height'
,
0.0
)
)
or
0.0
for
node
in
graphtree
[
'graph'
].
iternodes
()))
except
ValueError
as
err
:
LOG
.
debug
(
str
(
err
))
...
...
@@ -520,8 +520,8 @@ def render_statechart(scene, graphtree=None, keep_pos=False, dump_gfx=''):
dump
=
(
'-Tpng -o'
+
dump_gfx
)
if
dump_gfx
else
''
))
# bb is not visible directly - extract it from the low level api:
bounding_rect
=
[
float
(
val
)
for
val
in
dotgraph
.
graphviz
.
agget
(
graph
.
handle
,
'bb'
).
split
(
','
)]
dot_dpi
=
float
(
dotgraph
.
graphviz
.
agget
(
graph
.
handle
,
'dpi'
))
dotgraph
.
graphviz
.
agget
(
graph
.
handle
,
b
'bb'
).
split
(
b
','
)]
dot_dpi
=
float
(
dotgraph
.
graphviz
.
agget
(
graph
.
handle
,
b
'dpi'
))
#fontname = graph.graph_attr.get('fontname')
#fontsize = graph.graph_attr.get('fontsize')
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment