Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
56c9d4a4
Commit
56c9d4a4
authored
Mar 22, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
graph_editor: python3 support
parent
9046767d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
bt5/erp5_graph_editor/ExtensionTemplateItem/portal_components/extension.erp5.GraphEditorUtils.py
...Item/portal_components/extension.erp5.GraphEditorUtils.py
+3
-3
No files found.
bt5/erp5_graph_editor/ExtensionTemplateItem/portal_components/extension.erp5.GraphEditorUtils.py
View file @
56c9d4a4
...
...
@@ -44,7 +44,7 @@ def ERP5Site_getGraphEditorGraphLayout(self, graph_editor_dict):
edge
[
'destination'
],
))
new_graph
,
=
pydot
.
graph_from_dot_data
(
graph
.
create_dot
())
# pylint:disable=unpacking-non-sequence
new_graph
,
=
pydot
.
graph_from_dot_data
(
graph
.
create_dot
()
.
decode
()
)
# pylint:disable=unpacking-non-sequence
# calulate the ratio from the size of the bounding box
origin_left
,
origin_top
,
max_left
,
max_top
=
[
...
...
@@ -55,8 +55,8 @@ def ERP5Site_getGraphEditorGraphLayout(self, graph_editor_dict):
node_position_dict
=
dict
()
for
node
in
new_graph
.
get_nodes
():
# skip technical nodes
if
node
.
get_name
()
in
(
'graph'
,
'node'
,
'edge'
):
# skip technical nodes
(and \n bug on py3)
if
node
.
get_name
()
in
(
'graph'
,
'node'
,
'edge'
,
'"
\
\
n"'
):
continue
left
,
top
=
[
float
(
p
)
for
p
in
node
.
get_pos
()[
1
:
-
1
].
split
(
","
)]
node_position_dict
[
node
.
get_name
().
strip
(
'"'
)]
=
dict
(
...
...
Write
Preview
Markdown
is supported
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