1
0
Fork 0

documenting and cleanup

This commit is contained in:
Enoch Riese 2022-08-17 13:11:22 -05:00
parent 6b840d81dd
commit 3d54cbbc52
7 changed files with 374 additions and 219 deletions

View file

@ -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,

View file

@ -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)))
},
},
}