Skip to content

Commit

Permalink
fix(ImagePreview): optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
vvpvvp committed Jun 10, 2019
1 parent 332ee15 commit c0442ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/image-preview/image-preview-modal.vue
Expand Up @@ -59,7 +59,7 @@ export default {
let width = this.$refs.img.width;
let height = this.$refs.img.height;
if (width > 800 || height > 12000) {
let percent = Math.min(width / 800, height / 12000);
let percent = Math.max(width / 800, height / 12000);
width = width / percent;
height = height / percent;
}
Expand Down

0 comments on commit c0442ab

Please sign in to comment.