1
0
Fork 0
freesewing/markdown/dev/reference/api/snippet/clone/en.md
2022-01-19 11:31:39 +01:00

471 B

title
clone()
Snippet snippet.clone()

Returns a new Snippets object that is a deep copy of this one.

An example of the Snippet.clone() method
let { Point, points, Snippet, snippets } = part.shorthand();

points.anchor = new Point(35, 35);
snippets.demo = new Snippet("logo", points.anchor)
  .attr("style", "color: #f006");

snippets.clone = snippets.demo
  .clone()
  .attr("data-scale", 0.5);