From 2b840c2f477a2908375a9e7c9038b97578c07a50 Mon Sep 17 00:00:00 2001 From: DD Date: Tue, 3 Apr 2018 18:21:12 -0400 Subject: [PATCH] Add ability to fill transparent text --- src/helper/tools/fill-tool.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/helper/tools/fill-tool.js b/src/helper/tools/fill-tool.js index 572c6a23..5c99d68f 100644 --- a/src/helper/tools/fill-tool.js +++ b/src/helper/tools/fill-tool.js @@ -44,8 +44,13 @@ class FillTool extends paper.Tool { fill: true, guide: false, match: function (hitResult) { - return (hitResult.item instanceof paper.Path || hitResult.item instanceof paper.PointText) && - (hitResult.item.hasFill() || hitResult.item.closed || isAlmostClosedPath(hitResult.item)); + if (hitResult.item instanceof paper.Path && + (hitResult.item.hasFill() || hitResult.item.closed || isAlmostClosedPath(hitResult.item))) { + return true; + } + if (hitResult.item instanceof paper.PointText) { + return true; + } }, hitUnfilledPaths: true, tolerance: FillTool.TOLERANCE / paper.view.zoom