diff --git a/package.json b/package.json index acba26ff..0e9985ae 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "react-dom": "^16" }, "devDependencies": { - "@scratch/paper": "0.11.20180329192534", + "@scratch/paper": "0.11.20180411183636", "autoprefixer": "8.1.0", "babel-cli": "6.26.0", "babel-core": "^6.23.1", diff --git a/src/helper/tools/fill-tool.js b/src/helper/tools/fill-tool.js index 9b43ff9f..25a60fcb 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