1
0
Fork 0

Merge branch 'develop' of github.com:freesewing/freesewing into develop

This commit is contained in:
Joost De Cock 2019-09-15 11:40:12 +02:00
commit 2e29a91c1c
2 changed files with 11 additions and 1 deletions

View file

@ -2,11 +2,15 @@ Unreleased:
date: date:
Added: Added:
Changed: Changed:
components:
- Tweaked DraftConfigurator tags to match CSS rules after frontend upgrade to react-intl v3
Deprecated: Deprecated:
Removed: Removed:
Fixed: Fixed:
create-freesewing-pattern: create-freesewing-pattern:
- Updated example package.json to use latest tag rather than beta - Updated example package.json to use latest tag rather than beta
utils:
- Fix measurementDiffers to pass breasts parameter to necstimate
Security: Security:
2.0.2: 2.0.2:

View file

@ -1,11 +1,17 @@
import neckstimate from '../neckstimate' import neckstimate from '../neckstimate'
// This returns how many sizes a measurement differs from the neckstimate value // This returns how many sizes a measurement differs from the neckstimate value
// 0 and 2 is great
// 2 to 5 is hmmm
// and above 5 is probably wrong
const measurementDiffers = ( const measurementDiffers = (
neckCircumference, neckCircumference,
measurementName, measurementName,
measurementValue, measurementValue,
breasts = false breasts = false
) => Math.abs(Math.round((measurementValue - neckstimate(neckCircumference, measurementName)) / 20)) ) =>
Math.abs(
Math.round((measurementValue - neckstimate(neckCircumference, measurementName, breasts)) / 20)
)
export default measurementDiffers export default measurementDiffers