From 67e072307c076a48e2eec563396fa189a2f5b54b Mon Sep 17 00:00:00 2001 From: fxwan Date: Thu, 27 Apr 2017 12:06:14 +0800 Subject: [PATCH] remove the y check --- lib/extract/extractText.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/extract/extractText.js b/lib/extract/extractText.js index 735278bb..ab0f653c 100644 --- a/lib/extract/extractText.js +++ b/lib/extract/extractText.js @@ -123,8 +123,10 @@ export default function(props, container, ref) { } let posY = null; - if (!_.isNil(y) && fontProps.fontSize) { + if (fontProps.fontSize) { posY = (parseFloat(y || 0) - parseFloat(fontProps.fontSize || 0)).toString(); + } else if (y) { + posY = y.toString(); } return { textAnchor: anchors[textAnchor] || 0,