Skip to content

Commit c5063eb

Browse files
committed
update for Maker.js 0.2.3
1 parent 3174d8c commit c5063eb

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

maker.js/makerjs-tests.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ function test() {
7575
];
7676
}
7777

78-
function testPath() {
78+
function testPath() {
79+
makerjs.path.breakAtPoint(paths.arc, [0,0]).type;
7980
makerjs.path.intersection(paths.circle, paths.arc).intersectionPoints;
8081
makerjs.path.mirror(paths.arc, true, true);
8182
makerjs.path.moveRelative(paths.circle, [0,0]);

maker.js/makerjs.d.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Project: https://github.com/Microsoft/maker.js
33
// Definitions by: Dan Marshall <https://github.com/danmarshall>
44
// Definitions: https://github.com/borisyankov/DefinitelyTyped
5+
56
/**
67
* Root module for Maker.js.
78
*
@@ -94,10 +95,6 @@ declare module MakerJs {
9495
* The main point of reference for this path.
9596
*/
9697
origin: IPoint;
97-
/**
98-
* Optional CSS style properties to be emitted into SVG. Useful for creating guidelines and debugging your model.
99-
*/
100-
cssStyle?: string;
10198
}
10299
/**
103100
* Test to see if an object implements the required properties of a path.
@@ -425,6 +422,17 @@ declare module MakerJs.path {
425422
*/
426423
function scale(pathToScale: IPath, scaleValue: number): IPath;
427424
}
425+
declare module MakerJs.path {
426+
/**
427+
* Breaks a path in two. The supplied path will end at the supplied pointOfBreak,
428+
* a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point.
429+
* For Circle, the original path will be converted in place to an Arc, and null is returned.
430+
*
431+
* @param pathToBreak The path to break.
432+
* @param pointOfBreak The point at which to break the path.
433+
*/
434+
function breakAtPoint(pathToBreak: IPath, pointOfBreak: IPoint): IPath;
435+
}
428436
declare module MakerJs.paths {
429437
/**
430438
* Class for arc path.

0 commit comments

Comments
 (0)