From bb145435ef7fcb9a1a99157bab3609b28d9e9402 Mon Sep 17 00:00:00 2001 From: Logan Terry Date: Mon, 25 Jan 2021 13:14:38 -0700 Subject: [PATCH] Fix stencil fixer shifting values it should only scale, and add interaction nodes to glyph menu --- .../app/glyph-menu/glyph-menu.component.html | 20 ++++++++++++ .../app/glyph-menu/glyph-menu.component.ts | 11 +++++++ SBOLCanvasFrontend/src/app/glyph.service.ts | 16 ++++++++++ .../interaction_nodes/association.xml | 24 ++++++++++++++ .../interaction_nodes/dissociation.xml | 32 +++++++++++++++++++ .../interaction_nodes/process.xml | 18 +++++++++++ resources/xmlFixer.py | 4 ++- 7 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 SBOLCanvasFrontend/src/assets/glyph_stencils/interaction_nodes/association.xml create mode 100644 SBOLCanvasFrontend/src/assets/glyph_stencils/interaction_nodes/dissociation.xml create mode 100644 SBOLCanvasFrontend/src/assets/glyph_stencils/interaction_nodes/process.xml diff --git a/SBOLCanvasFrontend/src/app/glyph-menu/glyph-menu.component.html b/SBOLCanvasFrontend/src/app/glyph-menu/glyph-menu.component.html index f3408dfc..67b57a2d 100644 --- a/SBOLCanvasFrontend/src/app/glyph-menu/glyph-menu.component.html +++ b/SBOLCanvasFrontend/src/app/glyph-menu/glyph-menu.component.html @@ -78,6 +78,26 @@ + + + + + Interaction Nodes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SBOLCanvasFrontend/src/assets/glyph_stencils/interaction_nodes/dissociation.xml b/SBOLCanvasFrontend/src/assets/glyph_stencils/interaction_nodes/dissociation.xml new file mode 100644 index 00000000..34b9088e --- /dev/null +++ b/SBOLCanvasFrontend/src/assets/glyph_stencils/interaction_nodes/dissociation.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SBOLCanvasFrontend/src/assets/glyph_stencils/interaction_nodes/process.xml b/SBOLCanvasFrontend/src/assets/glyph_stencils/interaction_nodes/process.xml new file mode 100644 index 00000000..c1848014 --- /dev/null +++ b/SBOLCanvasFrontend/src/assets/glyph_stencils/interaction_nodes/process.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/xmlFixer.py b/resources/xmlFixer.py index 4ca0b515..c0ddcb63 100755 --- a/resources/xmlFixer.py +++ b/resources/xmlFixer.py @@ -23,6 +23,8 @@ INF = 1000 +SHIFT_EXCLUDE_LIST =['rx','ry','x-axis-rotation'] #they contain x and y, but should only be scaled + def main(): args = parse_args() @@ -161,7 +163,7 @@ def shift_x_or_y_direction(shape, distance, x_or_y): for child in path.getchildren(): for key, val in child.attrib.items(): val = float(val) - if x_or_y in key.lower(): + if x_or_y in key.lower() and key.lower() not in SHIFT_EXCLUDE_LIST: val += distance child.attrib[key] = str(val)