From b5b1aa57d753ef2a20abed7988a7620e4113e366 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 15 Feb 2016 15:29:19 +0100 Subject: [PATCH] Keep empty clip mask in SVG export A path should be exported in SVG if it serves as a clip mask, otherwise all items in the clip group that were hidden by clipping in paper.js become visible in the SVG. --- src/svg/SvgExport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/svg/SvgExport.js b/src/svg/SvgExport.js index 74bc2620..16f59479 100644 --- a/src/svg/SvgExport.js +++ b/src/svg/SvgExport.js @@ -110,7 +110,7 @@ new function() { var segments = item._segments, type, attrs = getTransform(item._matrix); - if (segments.length === 0) + if (segments.length === 0 && !item.isClipMask()) return null; if (matchShapes && !item.hasHandles()) { if (segments.length >= 3) {