chore(bejamin) Removed circumference suffix from measurements
This commit is contained in:
parent
d87fd7dd8f
commit
f2ef22ad69
3 changed files with 6 additions and 12 deletions
|
@ -13,7 +13,7 @@ export default {
|
||||||
fit: ['collarEase', 'adjustmentRibbon'],
|
fit: ['collarEase', 'adjustmentRibbon'],
|
||||||
style: ['tipWidth', 'knotWidth', 'bowLength', 'bowStyle', 'endStyle']
|
style: ['tipWidth', 'knotWidth', 'bowLength', 'bowStyle', 'endStyle']
|
||||||
},
|
},
|
||||||
measurements: ['neckCircumference'],
|
measurements: ['neck'],
|
||||||
dependencies: {},
|
dependencies: {},
|
||||||
inject: {
|
inject: {
|
||||||
bow1: 'base',
|
bow1: 'base',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export default function(part) {
|
export default function (part) {
|
||||||
let {
|
let {
|
||||||
store,
|
store,
|
||||||
sa,
|
sa,
|
||||||
|
@ -25,7 +25,7 @@ export default function(part) {
|
||||||
'bowLength',
|
'bowLength',
|
||||||
'collarEase'
|
'collarEase'
|
||||||
])
|
])
|
||||||
store.set(option, measurements.neckCircumference * options[option])
|
store.set(option, measurements.neck * options[option])
|
||||||
|
|
||||||
if (options.adjustmentRibbon) {
|
if (options.adjustmentRibbon) {
|
||||||
store.set('ribbonWidth', Math.max(options.adjustmentRibbonWidth, store.get('ribbonWidth')))
|
store.set('ribbonWidth', Math.max(options.adjustmentRibbonWidth, store.get('ribbonWidth')))
|
||||||
|
@ -68,10 +68,7 @@ export default function(part) {
|
||||||
if (options.endStyle === 'straight') {
|
if (options.endStyle === 'straight') {
|
||||||
paths.cap = new Path().move(points.tip2Bottom).line(points.tip2Top)
|
paths.cap = new Path().move(points.tip2Bottom).line(points.tip2Top)
|
||||||
} else if (options.endStyle === 'pointed') {
|
} else if (options.endStyle === 'pointed') {
|
||||||
paths.cap = new Path()
|
paths.cap = new Path().move(points.tip2Bottom).line(points.tip).line(points.tip2Top)
|
||||||
.move(points.tip2Bottom)
|
|
||||||
.line(points.tip)
|
|
||||||
.line(points.tip2Top)
|
|
||||||
} else {
|
} else {
|
||||||
points.roundBottom = new Point(points.tip.x, points.tip2Bottom.y)
|
points.roundBottom = new Point(points.tip.x, points.tip2Bottom.y)
|
||||||
points.roundTop = points.roundBottom.flipY()
|
points.roundTop = points.roundBottom.flipY()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export default function(part) {
|
export default function (part) {
|
||||||
let {
|
let {
|
||||||
Point,
|
Point,
|
||||||
Path,
|
Path,
|
||||||
|
@ -21,10 +21,7 @@ export default function(part) {
|
||||||
// Points
|
// Points
|
||||||
points.bottomLeft = new Point(0, 0.5 * store.get('ribbonWidth'))
|
points.bottomLeft = new Point(0, 0.5 * store.get('ribbonWidth'))
|
||||||
points.topLeft = points.bottomLeft.flipY()
|
points.topLeft = points.bottomLeft.flipY()
|
||||||
points.bottomRight = points.bottomLeft.shift(
|
points.bottomRight = points.bottomLeft.shift(0, measurements.neck * (1 + options.collarEase))
|
||||||
0,
|
|
||||||
measurements.neckCircumference * (1 + options.collarEase)
|
|
||||||
)
|
|
||||||
points.topRight = points.bottomRight.flipY()
|
points.topRight = points.bottomRight.flipY()
|
||||||
points.titleAnchor = points.topLeft.shiftFractionTowards(points.bottomRight, 0.5)
|
points.titleAnchor = points.topLeft.shiftFractionTowards(points.bottomRight, 0.5)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue