feat: Flat import of markdown repo
This is a flat (without history) import of (some of) the content from our markdown module. We've imported this without history because the repo contains our blog posts and showcases posts content prior to porting them to strapi. Since this contains many images, it would balloon the size of this repo to import the full history. Instead, please refer to the history of the (archived) markdown repo at: https://github.com/freesewing/markdown
This commit is contained in:
parent
1671a896b5
commit
b34a2ee2ed
6132 changed files with 244167 additions and 0 deletions
45
markdown/dev/reference/api/point/dx/en.md
Normal file
45
markdown/dev/reference/api/point/dx/en.md
Normal file
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
title: dx()
|
||||
---
|
||||
|
||||
```js
|
||||
float point.dx(Point point)
|
||||
```
|
||||
|
||||
Returns the delta along the X-axis between this point and the point you pass it.
|
||||
|
||||
<Example
|
||||
part="point_dx"
|
||||
caption="An example of the Point.dx() method"
|
||||
/>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand()
|
||||
|
||||
points.from = new Point(10, 10)
|
||||
points.to = new Point(80, 70)
|
||||
|
||||
paths.line = new Path()
|
||||
.move(points.from)
|
||||
.line(points.to)
|
||||
.attr("class", "dashed")
|
||||
|
||||
points.totop = points.from.shift(0,points.from.dx(points.to))
|
||||
|
||||
points.text_dx = points.from
|
||||
.shiftFractionTowards(points.totop, 0.6)
|
||||
.shiftFractionTowards(points.to,0.1)
|
||||
.attr("data-text", points.from.dx(points.to)+"mm")
|
||||
.attr("data-text-class", "text-sm fill-note center")
|
||||
|
||||
paths.line_dx = new Path()
|
||||
.move(points.from)
|
||||
.line(points.totop)
|
||||
.attr("class", "dashed")
|
||||
|
||||
paths.line_dy = new Path()
|
||||
.move(points.to)
|
||||
.line(points.totop)
|
||||
.attr("class", "dashed")
|
||||
```
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue