2022-02-19 08:04:25 +01:00
|
|
|
---
|
2021-10-17 18:26:00 +02:00
|
|
|
title: embed
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-02 17:41:04 +02:00
|
|
|
The `embed` setting controls whether to generate an SVG document suitable for
|
|
|
|
printing, or for embedding on a web page.
|
2022-09-30 15:34:59 +02:00
|
|
|
|
|
|
|
## Signature
|
|
|
|
|
|
|
|
```js
|
|
|
|
const settings = {
|
|
|
|
Boolean embed=false
|
|
|
|
}
|
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2021-12-28 21:07:45 +01:00
|
|
|
The default for `embed` is `false` which will include the `width` and `height`
|
|
|
|
attributes in the SVG tag, thereby making it suitable for printing.
|
|
|
|
|
2022-09-30 15:34:59 +02:00
|
|
|
When set to `true` the `width` and `height` attributes will not be added which
|
|
|
|
allows you to inject the SVG into an HTML document, where it will responsively
|
|
|
|
scale.
|
|
|
|
|
|
|
|
## Example
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
```js
|
2022-10-02 17:41:04 +02:00
|
|
|
import { Aaron } from "@freesewing/aaron"
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-30 15:34:59 +02:00
|
|
|
const pattern = new Aaron({
|
2021-08-25 16:09:31 +02:00
|
|
|
embed: true
|
|
|
|
})
|
|
|
|
```
|