diff --git a/maker.js/makerjs-tests.ts b/maker.js/makerjs-tests.ts index be5b53229..59a50e4fc 100644 --- a/maker.js/makerjs-tests.ts +++ b/maker.js/makerjs-tests.ts @@ -116,6 +116,15 @@ function test() { new makerjs.paths.Chord(paths.arc); new makerjs.paths.Parallel(paths.line, 4, [1,1]); + //paths.line.layer = "0"; + + var x: MakerJs.IPathLine = { + type: "line", + origin: [9,9], + end: [8,8], + layer: "4" + }; + return paths; } diff --git a/maker.js/makerjs.d.ts b/maker.js/makerjs.d.ts index bcba375f8..69cd3dbb7 100644 --- a/maker.js/makerjs.d.ts +++ b/maker.js/makerjs.d.ts @@ -96,11 +96,15 @@ declare module MakerJs { /** * The type of the path, e.g. "line", "circle", or "arc". These strings are enumerated in pathType. */ - type: string; + "type": string; /** * The main point of reference for this path. */ origin: IPoint; + /** + * Optional layer of this path. + */ + layer?: string; } /** * Test to see if an object implements the required properties of a path. @@ -193,7 +197,7 @@ declare module MakerJs { /** * Key is the type of a path, value is a function which accepts a path object a point object as its parameters. */ - [type: string]: (id: string, pathValue: IPath, origin: IPoint) => void; + [type: string]: (id: string, pathValue: IPath, origin: IPoint, layer: string) => void; } /** * String-based enumeration of all paths types. @@ -276,7 +280,7 @@ declare module MakerJs { /** * A model may want to specify its type, but this value is not employed yet. */ - type?: string; + "type"?: string; /** * Optional array of path objects in this model. */ @@ -293,6 +297,10 @@ declare module MakerJs { * An author may wish to add notes to this model instance. */ notes?: string; + /** + * Optional layer of this model. + */ + layer?: string; } /** * Test to see if an object implements the required properties of a model. @@ -844,7 +852,7 @@ declare module MakerJs.exporter { * @param pathToExport The path to export. * @param offset The offset position of the path. */ - exportPath(id: string, pathToExport: IPath, offset: IPoint): void; + exportPath(id: string, pathToExport: IPath, offset: IPoint, layer: string): void; /** * Export a model. *