From 66b1087d33bc7d258055e9abe1a18012d71f9281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Mon, 7 Apr 2014 12:18:04 +0200 Subject: [PATCH] Have boolean operation result inherit styles from the left-hand item in the operation. Closes #445. --- src/path/PathItem.Boolean.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/path/PathItem.Boolean.js b/src/path/PathItem.Boolean.js index ec9182c3..8d83a4d1 100644 --- a/src/path/PathItem.Boolean.js +++ b/src/path/PathItem.Boolean.js @@ -147,8 +147,11 @@ PathItem.inject(new function() { _path1.remove(); if (_path2) _path2.remove(); - // And then, we are done. - return result.reduce(); + // See if the CompoundPath can be reduced to just a simple Path. + result = result.reduce(); + // Copy over the left-hand item's style and we're done. + result.setStyle(path1._style); + return result; } /**