Skip to content

Commit

Permalink
Remove option: text.removeMarginPadding
Browse files Browse the repository at this point in the history
  • Loading branch information
kimmobrunfeldt committed Aug 2, 2015
1 parent 80c4c8c commit 9ef585d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions src/shape.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ var Shape = function Shape(container, opts) {
fill: null,
text: {
autoStyle: true,
removeMarginPadding: true,
alignToBottom: false,
color: null,
value: '',
Expand Down Expand Up @@ -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%)');

Expand Down

0 comments on commit 9ef585d

Please sign in to comment.