Skip to content

Commit

Permalink
Fix view modes can change image aspect ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
luejerry committed Jan 8, 2020
1 parent 09dfabc commit a5a197e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mangareader/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,21 @@
Object.assign(img.style, {
width: `${width}px`,
maxWidth: null,
maxHeight: null,
});
break;
case widthClamp.shrink:
Object.assign(img.style, {
width: null,
maxWidth: `${width}px`,
maxHeight: null,
});
break;
default:
Object.assign(img.style, {
width: null,
maxWidth: null,
maxHeight: null,
});
}
}
Expand Down

0 comments on commit a5a197e

Please sign in to comment.