1
0
Fork 0

chore(bejamin) Removed circumference suffix from measurements

This commit is contained in:
Joost De Cock 2020-06-30 15:16:30 +02:00
parent d87fd7dd8f
commit f2ef22ad69
3 changed files with 6 additions and 12 deletions

View file

@ -13,7 +13,7 @@ export default {
fit: ['collarEase', 'adjustmentRibbon'],
style: ['tipWidth', 'knotWidth', 'bowLength', 'bowStyle', 'endStyle']
},
measurements: ['neckCircumference'],
measurements: ['neck'],
dependencies: {},
inject: {
bow1: 'base',

View file

@ -1,4 +1,4 @@
export default function(part) {
export default function (part) {
let {
store,
sa,
@ -25,7 +25,7 @@ export default function(part) {
'bowLength',
'collarEase'
])
store.set(option, measurements.neckCircumference * options[option])
store.set(option, measurements.neck * options[option])
if (options.adjustmentRibbon) {
store.set('ribbonWidth', Math.max(options.adjustmentRibbonWidth, store.get('ribbonWidth')))
@ -68,10 +68,7 @@ export default function(part) {
if (options.endStyle === 'straight') {
paths.cap = new Path().move(points.tip2Bottom).line(points.tip2Top)
} else if (options.endStyle === 'pointed') {
paths.cap = new Path()
.move(points.tip2Bottom)
.line(points.tip)
.line(points.tip2Top)
paths.cap = new Path().move(points.tip2Bottom).line(points.tip).line(points.tip2Top)
} else {
points.roundBottom = new Point(points.tip.x, points.tip2Bottom.y)
points.roundTop = points.roundBottom.flipY()

View file

@ -1,4 +1,4 @@
export default function(part) {
export default function (part) {
let {
Point,
Path,
@ -21,10 +21,7 @@ export default function(part) {
// Points
points.bottomLeft = new Point(0, 0.5 * store.get('ribbonWidth'))
points.topLeft = points.bottomLeft.flipY()
points.bottomRight = points.bottomLeft.shift(
0,
measurements.neckCircumference * (1 + options.collarEase)
)
points.bottomRight = points.bottomLeft.shift(0, measurements.neck * (1 + options.collarEase))
points.topRight = points.bottomRight.flipY()
points.titleAnchor = points.topLeft.shiftFractionTowards(points.bottomRight, 0.5)