From 694e191fee72d2c7e017aa7a13d806acd75a5f00 Mon Sep 17 00:00:00 2001 From: Nils Kenneweg Date: Mon, 10 Feb 2014 10:15:23 +0100 Subject: [PATCH] add radius to svgHelper. --- app/assets/javascripts/timelines/SvgHelper.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/timelines/SvgHelper.js b/app/assets/javascripts/timelines/SvgHelper.js index 1b334b1a36..c340473cc1 100644 --- a/app/assets/javascripts/timelines/SvgHelper.js +++ b/app/assets/javascripts/timelines/SvgHelper.js @@ -77,13 +77,21 @@ Timeline.SvgHelper = (function() { }); }; - SvgHelper.prototype.rect = function(x, y, w, h) { + SvgHelper.prototype.rect = function(x, y, w, h, radius) { var node = this.provideNode('rect').attr({ 'x': x, 'y': y, 'width': w, - 'height': h, + 'height': h }); + + if (radius) { + node.attr({ + 'rx': radius, + 'ry': radius + }); + } + this.root.appendChild(node); return node; };