From 6b25de59b9eea280c15ef9fff04255bcee81b931 Mon Sep 17 00:00:00 2001 From: David Evans Date: Sat, 11 Nov 2017 23:39:15 +0000 Subject: [PATCH] Add regions around all terminator types --- scripts/sequence/components/AgentCap.js | 36 ++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/scripts/sequence/components/AgentCap.js b/scripts/sequence/components/AgentCap.js index e098923..1b7e661 100644 --- a/scripts/sequence/components/AgentCap.js +++ b/scripts/sequence/components/AgentCap.js @@ -94,6 +94,14 @@ define([ ), }, config.attrs))); + env.makeRegion().appendChild(svg.make('rect', { + 'x': x - d, + 'y': y, + 'width': d * 2, + 'height': d * 2, + 'fill': 'transparent', + })); + return { lineTop: d, lineBottom: d, @@ -138,6 +146,14 @@ define([ 'width': width, }, config.attrs))); + env.makeRegion().appendChild(svg.make('rect', { + 'x': x - width / 2, + 'y': y, + 'width': width, + 'height': config.attrs.height, + 'fill': 'transparent', + })); + return { lineTop: 0, lineBottom: config.attrs.height, @@ -189,6 +205,14 @@ define([ 'fill': 'url(#' + gradID + ')', })); + env.makeRegion().appendChild(svg.make('rect', { + 'x': x - config.width / 2, + 'y': y, + 'width': config.width, + 'height': config.height, + 'fill': 'transparent', + })); + return { lineTop: config.height, lineBottom: 0, @@ -211,8 +235,18 @@ define([ return config.height; } - render(y, agentInfo, env) { + render(y, {x}, env) { const config = env.theme.agentCap.none; + + const w = 10; + env.makeRegion().appendChild(svg.make('rect', { + 'x': x - w / 2, + 'y': y, + 'width': w, + 'height': config.height, + 'fill': 'transparent', + })); + return { lineTop: config.height, lineBottom: 0,