1
0
Fork 0
freesewing/packages/examples/src/point.clone.js
2019-04-19 08:31:40 +02:00

23 lines
535 B
JavaScript

import freesewing from "freesewing";
import { box } from "./shared";
var pointClone = {
draft: function(part) {
// prettier-ignore
let {Point, points, Snippet, snippets} = part.shorthand();
box(part);
points.A= new Point(25, 25)
.attr('data-text', 'Point A')
.attr('data-text-class', 'text-xl')
.attr('data-text-fill-opacity', '0.5');
points.B = points.A.clone().attr('data-text', 'Point B');
snippets.x = new Snippet("x", points.A);
return part;
}
};
export default pointClone;