fixed user image scaling

This commit is contained in:
Luke Pulverenti 2014-05-02 10:49:28 -04:00
parent d5780727eb
commit 5218e67d4e
12 changed files with 59 additions and 24 deletions

View file

@ -2041,16 +2041,17 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
if (ratio) {
if (options.width) {
options.width = options.width * ratio;
options.width = Math.round(options.width * ratio);
}
if (options.height) {
options.height = options.height * ratio;
options.height = Math.round(options.height * ratio);
}
if (options.maxWidth) {
options.maxWidth = options.maxWidth * ratio;
options.maxWidth = Math.round(options.maxWidth * ratio);
}
if (options.maxHeight) {
options.maxHeight = options.maxHeight * ratio;
options.maxHeight = Math.round(options.maxHeight * ratio);
}
}