From 9ef585d916f55d1a0041f3dd9326434c68a92a6d Mon Sep 17 00:00:00 2001 From: Kimmo Brunfeldt Date: Sun, 2 Aug 2015 20:58:37 +0300 Subject: [PATCH] Remove option: text.removeMarginPadding --- README.md | 7 ------- src/shape.js | 8 ++------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 833ec3b..69baed1 100644 --- a/README.md +++ b/README.md @@ -237,13 +237,6 @@ with CSS. // Default: true autoStyle: true, - // Only effective when autoStyle is enabled. - // If true, padding and margin are removed automatically - // from text element. Set this to false, if you want to - // set margin or padding for text element - // Default: true - removeMarginPadding: true, - // Only effective if the shape is SemiCircle. // If true, baseline for text is aligned with bottom of // the SVG canvas. If false, bottom line of SVG canvas diff --git a/src/shape.js b/src/shape.js index d43ddf7..823823b 100644 --- a/src/shape.js +++ b/src/shape.js @@ -30,7 +30,6 @@ var Shape = function Shape(container, opts) { fill: null, text: { autoStyle: true, - removeMarginPadding: true, alignToBottom: false, color: null, value: '', @@ -205,11 +204,8 @@ Shape.prototype._createTextElement = function _createTextElement(opts, container element.style.position = 'absolute'; element.style.left = '50%'; element.style.top = '50%'; - - if (opts.text.removeMarginPadding) { - element.style.padding = 0; - element.style.margin = 0; - } + element.style.padding = 0; + element.style.margin = 0; utils.setStyle(element, 'transform', 'translate(-50%, -50%)');