construction: Migrated path_clone
This commit is contained in:
parent
9d43333b2e
commit
2d11ca434f
7 changed files with 40 additions and 35 deletions
25
packages/examples/src/path_attr.js
Normal file
25
packages/examples/src/path_attr.js
Normal 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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue