1
0
Fork 0

construction: Migrated path_clone

This commit is contained in:
Joost De Cock 2019-01-27 10:45:10 +01:00
parent 9d43333b2e
commit 2d11ca434f
7 changed files with 40 additions and 35 deletions

View file

@ -0,0 +1,25 @@
export default part => {
let {
Point,
points,
Path,
paths,
Snippet,
snippets,
macro
} = part.shorthand();
points.B = new Point(10, 50);
points.BCp2 = new Point(40, 10);
points.C = new Point(90, 30);
points.CCp1 = new Point(50, 90);
paths.example = new Path()
.move(points.B)
.curve(points.BCp2, points.CCp1, points.C)
.attr("class", "stroke-xl canvas")
.attr("data-text", "I am text placed on a path")
.attr("data-text-class", "center fill-note");
return part;
};