I18n example (#33)
* feat: i18n pt 1 * fix: prevent float calculations when updating dimensions
This commit is contained in:
@@ -59,8 +59,8 @@ export const getValidDimensions = ({
|
||||
// if closest valid iteration is current iteration, move one iteration in the change direction
|
||||
if (iter === (dimensions[keys.changed] / minInc[keys.changed])) { iter += direction; }
|
||||
|
||||
out[keys.changed] = iter * minInc[keys.changed];
|
||||
out[keys.other] = out[keys.changed] * (locked[keys.other] / locked[keys.changed]);
|
||||
out[keys.changed] = Math.round(iter * minInc[keys.changed]);
|
||||
out[keys.other] = Math.round(out[keys.changed] * (locked[keys.other] / locked[keys.changed]));
|
||||
|
||||
return out;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user