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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
3cd556af
Commit
3cd556af
authored
Mar 22, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
graph_editor: python3 support
parent
d945e463
Changes
1
Hide 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 @
3cd556af
...
...
@@ -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