From b37c1bfa08400a9e867adddc3a21308d78eef58a Mon Sep 17 00:00:00 2001 From: Alex Lockwood Date: Tue, 8 Aug 2017 09:15:57 -0700 Subject: [PATCH] transform path blocks after flattening layer --- .../canvas/canvaslayers.directive.ts | 6 ++++- .../layerlisttree.component.html | 6 ++--- .../layertimeline/layerlisttree.component.ts | 26 ++++++++++++------ .../layertimeline.component.html | 2 +- .../layertimeline/layertimeline.component.ts | 4 +-- src/app/scripts/export/SvgSerializer.ts | 6 ++++- src/app/scripts/import/SvgLoader.ts | 16 ++++++++--- src/app/services/layertimeline.service.ts | 27 ++++++++++++------- 8 files changed, 65 insertions(+), 28 deletions(-) diff --git a/src/app/components/canvas/canvaslayers.directive.ts b/src/app/components/canvas/canvaslayers.directive.ts index ecc7c990..a59e9b59 100644 --- a/src/app/components/canvas/canvaslayers.directive.ts +++ b/src/app/components/canvas/canvaslayers.directive.ts @@ -182,7 +182,11 @@ export class CanvasLayersDirective extends CanvasLayoutMixin(DestroyableMixin()) let pathLength: number; if (Math.abs(a) !== 1 || Math.abs(d) !== 1) { // Then recompute the scaled path length. - pathLength = layer.pathData.transform(flattenedTransform).getSubPathLength(0); + pathLength = layer.pathData + .mutate() + .transform(flattenedTransform) + .build() + .getSubPathLength(0); } else { pathLength = layer.pathData.getSubPathLength(0); } diff --git a/src/app/components/layertimeline/layerlisttree.component.html b/src/app/components/layertimeline/layerlisttree.component.html index dfe85201..d774a223 100644 --- a/src/app/components/layertimeline/layerlisttree.component.html +++ b/src/app/components/layertimeline/layerlisttree.component.html @@ -39,9 +39,9 @@ Convert to path