From 3fcb1213a842f48ed2527a0ec4a2f643aa665965 Mon Sep 17 00:00:00 2001 From: AntoineC Date: Mon, 10 Dec 2018 17:18:24 +0100 Subject: [PATCH 1/2] Fix type of scaling property from number to Point --- types/paper/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/paper/index.d.ts b/types/paper/index.d.ts index d3c818b112..5709826f6a 100644 --- a/types/paper/index.d.ts +++ b/types/paper/index.d.ts @@ -4865,7 +4865,7 @@ declare module paper { /** * The current scale factor of the view, as described by its matrix. */ - scaling: number; + scaling: Point; /** * The view’s transformation matrix, defining the view onto the project’s contents (position, zoom level, rotation, etc). From 084b2d56eaad28caee9f7255fe7c0c881313909d Mon Sep 17 00:00:00 2001 From: "Charnoz, Antoine" Date: Mon, 10 Dec 2018 19:24:02 +0100 Subject: [PATCH 2/2] Add test for scaling of view --- types/paper/paper-tests.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/paper/paper-tests.ts b/types/paper/paper-tests.ts index 165c64b2d8..1d1bc32abe 100644 --- a/types/paper/paper-tests.ts +++ b/types/paper/paper-tests.ts @@ -79,6 +79,8 @@ hitTestResults = paper.project.hitTestAll(hitTestPoint, hitOptionsInterfaceEmpty hitTestResults = paper.project.hitTestAll(hitTestPoint, hitOptionsInterfacePartial); hitTestResults = paper.project.hitTestAll(hitTestPoint, hitOptionsInterfaceFull); +paper.view.scaling = new paper.Point(1, 1); + function Examples() { function BooleanOperations(){ let text = new paper.PointText({