1
0
Fork 0
freesewing/lib/part.ts
2018-07-11 12:45:02 +00:00

20 lines
353 B
TypeScript

import Point from './point'
export default class Part {
id: string | number;
points: {
[index: string]: Point;
}
[propName: string]: any;
constructor(id: string | number) {
this.id = id;
this.points = {};
return this;
}
newPoint(id: string | number, x: number, y: number) {
this.points[id] = new Point(x, y);
}
}