Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
91e86f7b
Commit
91e86f7b
authored
May 29, 2019
by
Piotr Gawron
Browse files
remove duplicate entries from line
parent
e67903a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
converter-SBGNML/src/main/java/lcsb/mapviewer/converter/model/sbgnml/SbgnmlXmlParser.java
View file @
91e86f7b
...
...
@@ -1156,20 +1156,6 @@ public class SbgnmlXmlParser {
}
}
/**
* Returns center point for given process.
*
* @param p
* completely parsed process to compute center point from
* @return center point for given process
*/
private
Point2D
getCenterPointFromProcess
(
Process
p
)
{
Double
centralPointX
=
new
Double
(
p
.
getCentralPoint
().
getBbox
().
getX
()
+
p
.
getCentralPoint
().
getBbox
().
getW
()
/
2
);
Double
centralPointY
=
new
Double
(
p
.
getCentralPoint
().
getBbox
().
getY
()
+
p
.
getCentralPoint
().
getBbox
().
getH
()
/
2
);
Point2D
centerOfReactionPoint
=
new
Point2D
.
Double
(
centralPointX
,
centralPointY
);
return
centerOfReactionPoint
;
}
/**
* Returns proper Reaction object based on given glyph clazz.
*
...
...
@@ -1255,11 +1241,6 @@ public class SbgnmlXmlParser {
Glyph
source
=
(
Glyph
)
a
.
getSource
();
reactant
.
setElement
(
model
.
getElementByElementId
(
source
.
getId
()));
List
<
Point2D
>
pointList
=
getLinePoints
(
a
);
if
(
p
.
getReagentArcs
().
size
()
==
1
)
{
pointList
.
add
(
getCenterPointFromProcess
(
p
));
}
else
{
pointList
.
add
(
pointList
.
get
(
pointList
.
size
()
-
1
));
}
PolylineData
line
=
parseLine
(
a
,
pointList
);
reactant
.
setLine
(
line
);
if
(
andOperator
!=
null
)
{
...
...
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