Skip to content

Commit

Permalink
fix wrong ratio calculation (fixes #550)
Browse files Browse the repository at this point in the history
  • Loading branch information
aFarkas committed Oct 29, 2018
1 parent 82ce38e commit df41b88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/rias/ls.rias.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@
var widthAlias = options.widthmap[width] || width;
var candidate = {
u: url.replace(regWidth, widthAlias)
.replace(regHeight, options.ratio ? Math.round(width * options.ratio) : ''),
.replace(regHeight, options.ratio ?
riasCfg.traditionalRatio ?
Math.round(width * options.ratio) :
Math.round(width / options.ratio)
: ''),
w: width
};

Expand Down

0 comments on commit df41b88

Please sign in to comment.