documenting and cleanup
This commit is contained in:
parent
6b840d81dd
commit
3d54cbbc52
7 changed files with 374 additions and 219 deletions
|
@ -13,6 +13,11 @@ const colors = {
|
|||
contrast: '#ec4899'
|
||||
}
|
||||
|
||||
/**
|
||||
* generate a stylesheet
|
||||
* scale: the scale of the markings
|
||||
* stripped: should nested declarations be stripped out? Necessary for svgToPdfkit
|
||||
* */
|
||||
export default (scale, stripped) => `
|
||||
${!stripped ? '/* Reset */' : ''}
|
||||
${!stripped ? 'svg.freesewing ' : ''}path,
|
||||
|
|
|
@ -92,6 +92,14 @@ export default {
|
|||
.attr('data-text-class', 'fill-current font-bold')
|
||||
.attr('data-text-transform', transform(so.at.shift(-90 - so.rotation, shift * so.scale)))
|
||||
}
|
||||
shift += 6
|
||||
const dateformat = require('dateformat')
|
||||
const now = new Date()
|
||||
this.points[`_${prefix}_exportDate`] = so.at
|
||||
.shift(-90 - so.rotation, shift * so.scale)
|
||||
.attr('data-text', dateformat(now, 'yyyymmdd"T"HHMMo'))
|
||||
.attr('data-text-class', 'text-sm')
|
||||
.attr('data-text-transform', transform(so.at.shift(-90 - so.rotation, shift * so.scale)))
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue