From e7e97b0008899abaff83d889f9bc35af8e26ce16 Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Wed, 3 Dec 2014 20:14:56 -0500 Subject: [PATCH] Adding lines before and after main Regexp body --- src/js/parser/javascript/root.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/js/parser/javascript/root.js b/src/js/parser/javascript/root.js index b7d77c2..31c1fed 100644 --- a/src/js/parser/javascript/root.js +++ b/src/js/parser/javascript/root.js @@ -5,7 +5,8 @@ export default _.extend({}, Base, { type: 'root', render() { - this.regexp.container = this.container.group(); + this.regexp.container = this.container.group().transform(Snap.matrix() + .translate(10, 0)); this.regexp.render(); this.start = this.container.circle().attr({ @@ -25,10 +26,14 @@ export default _.extend({}, Base, { contentBox = this.regexp.container.getBBox(); + this.regexp.container.before( + this.container.path(Snap.format('M0,{cy}h10M{x2},{cy}h10', contentBox)) + ); + this.start.transform(Snap.matrix() - .translate(contentBox.x, contentBox.cy)); + .translate(0, contentBox.cy)); this.end.transform(Snap.matrix() - .translate(contentBox.x2, contentBox.cy)); + .translate(contentBox.x2 + 10, contentBox.cy)); }, flags() {