1
0
Fork 0

feat(core): Added scale setting

This commit is contained in:
Joost De Cock 2021-12-24 14:47:42 +01:00
parent 724d5a8075
commit e4a87f3324
2 changed files with 3 additions and 1 deletions

View file

@ -60,6 +60,7 @@ export default function Pattern(config = { options: {} }) {
margin: 2,
layout: true,
debug: true,
scale: 1,
options: {},
absoluteOptions: {},
}

View file

@ -3,11 +3,12 @@ import { round } from './utils'
import { version } from '../package.json'
function Svg(pattern) {
console.log(pattern)
this.openGroups = []
this.layout = {}
this.freeId = 0
this.body = ''
this.style = ''
this.style = `svg.freesewing.pattern { --pattern-scale: ${pattern.settings.scale} }`
this.script = ''
this.defs = ''
this.pattern = pattern // Needed to expose pattern to hooks