From b6b0d82d71a973bef03d2e089b2d6cdb4a7260ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20G=C3=BCndel?= Date: Mon, 16 Apr 2018 17:46:39 +0200 Subject: [PATCH 1/2] dx and dy support --- packages/vx-text/src/Text.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/vx-text/src/Text.js b/packages/vx-text/src/Text.js index 379efdf5d..27bb5e81d 100644 --- a/packages/vx-text/src/Text.js +++ b/packages/vx-text/src/Text.js @@ -103,8 +103,8 @@ class Text extends Component { } = this.props; const { wordsByLines } = this.state; - const x = textProps.x + dx; - const y = textProps.y + dy; + const x = textProps.x; + const y = textProps.y; let startDy; switch (verticalAnchor) { @@ -139,10 +139,12 @@ class Text extends Component { return ( { wordsByLines.map((line, index) => ( From 95186b116473c99a86d177ee5b2fd8bc6393d78d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20G=C3=BCndel?= Date: Wed, 18 Apr 2018 20:02:29 +0200 Subject: [PATCH 2/2] use wrapping svg for dx and dy --- packages/vx-text/src/Text.js | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/packages/vx-text/src/Text.js b/packages/vx-text/src/Text.js index 27bb5e81d..b7947bc47 100644 --- a/packages/vx-text/src/Text.js +++ b/packages/vx-text/src/Text.js @@ -138,24 +138,22 @@ class Text extends Component { } return ( - - { - wordsByLines.map((line, index) => ( - - {line.words.join(' ')} - - )) - } - + + + { + wordsByLines.map((line, index) => ( + + {line.words.join(' ')} + + )) + } + + ); } } -export default Text; \ No newline at end of file +export default Text;