fix(markdown): Updated Example to v3
This commit is contained in:
parent
728449c627
commit
d1edf93750
2 changed files with 36 additions and 4 deletions
|
@ -7,8 +7,25 @@ The coordinate system in FreeSewing -- and in SVG -- follows the same rules as t
|
|||
You start at the top-left, and as you go to the right, the X-coordinate will increase.
|
||||
As you go down the Y-coordinate will increase.
|
||||
|
||||
<Example part="docs_coords">
|
||||
The SVG coordinate system
|
||||
<Example caption="The coordinate system in an SVG document">
|
||||
```mjs
|
||||
({ Point, points, paths, Path, part }) => {
|
||||
points.origin = new Point(10, 10)
|
||||
points.x = new Point(100, 10)
|
||||
points.y = new Point(10, 50)
|
||||
points.textX = new Point(85, 20).addText('X', 'text-lg')
|
||||
points.textY = new Point(12, 43).addText('Y', 'text-lg')
|
||||
paths.coords = new Path()
|
||||
.move(points.y)
|
||||
.line(points.origin)
|
||||
.line(points.x)
|
||||
.addClass('mark')
|
||||
.attr('marker-start', 'url(#dimensionFrom)')
|
||||
.attr('marker-end', 'url(#dimensionTo)')
|
||||
|
||||
return part
|
||||
}
|
||||
```
|
||||
</Example>
|
||||
|
||||
The image above illustrates both the X-axis and Y-axis.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue