From 78498f4fd57e0f7638206221e98920135167fc08 Mon Sep 17 00:00:00 2001 From: sapics Date: Fri, 6 May 2016 12:27:36 +0900 Subject: [PATCH] Add last curve segment point in path.flatten --- src/path/Path.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/path/Path.js b/src/path/Path.js index 4db0b720..678abe85 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -1255,6 +1255,9 @@ var Path = PathItem.extend(/** @lends Path# */{ for (var i = 0, l = parts.length; i < l; i++) { segments.push(new Segment(parts[i].curve.slice(0, 2))); } + if (!this._closed && l) { + segments.push(new Segment(parts[l - 1].curve.slice(6))); + } this.setSegments(segments); },