Skip to content

Commit

Permalink
Limit optimal stretch if recommendation is not skin-tight
Browse files Browse the repository at this point in the history
* caused weird discontinuity in pants
  • Loading branch information
nomasi committed Jun 8, 2022
1 parent eab8d8d commit 45fb136
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/sizeme-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ function doMatch (fitRequest, token, useProfile) {

function getRecommendedFit (fitResults, optimalFit) {
const optFit = optimalFit ? optimalFit : DEFAULT_OPTIMAL_FIT;
const optStretch = DEFAULT_OPTIMAL_STRETCH;
const optStretch = optFit > 1000 ? DEFAULT_OPTIMAL_STRETCH / 5 : DEFAULT_OPTIMAL_STRETCH;
const maxDist = uiOptions.maxRecommendationDistance || 9999;
const [bestMatch] = fitResults
.filter(([, res]) => res.accuracy > 0)
Expand Down

0 comments on commit 45fb136

Please sign in to comment.