diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-07-20 19:26:51 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2019-07-20 19:26:51 -0100 |
commit | 201196a7d734c193d5a7f28a9394655a62c0d7f3 (patch) | |
tree | a992f310ef156ed3b48478876b29fd139f3028f3 | |
parent | bafe39332e9be1d835b6cd521bf12c97c947fc53 (diff) |
eslint
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r-- | src/components/PostAttachment.vue | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/components/PostAttachment.vue b/src/components/PostAttachment.vue index 04c575bd..471f6e69 100644 --- a/src/components/PostAttachment.vue +++ b/src/components/PostAttachment.vue @@ -7,7 +7,7 @@ size="full" @close="closeModal" @previous="showPrevious" @next="showNext"> <div class="modal__content"> - <canvas ref="modalCanvas"></canvas> + <canvas ref="modalCanvas" /> </div> </modal> </masonry> @@ -38,17 +38,17 @@ export default { methods: { displayResizedImage() { var canvas = this.$refs.modalCanvas - var ctx = canvas.getContext("2d") + var ctx = canvas.getContext('2d') var img = new Image() img.onload = function() { - var width= img.width + var width = img.width var height = img.height - if ( width > window.innerWidth ) { - height = height * ( window.innerWidth / width ) + if (width > window.innerWidth) { + height = height * (window.innerWidth / width) width = window.innerWidth } - if ( height > window.innerHeight ) { - width = width * ( window.innerHeight / height ) + if (height > window.innerHeight) { + width = width * (window.innerHeight / height) height = window.innerHeight } canvas.width = width |