From e22e5e42a0e25d1c8fb95626376b1126a7557470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sat, 19 Jun 2021 21:46:18 +0200 Subject: [PATCH] switch to camel case. --- src/component/main.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/component/main.vue b/src/component/main.vue index 0bdb56f1..0875652c 100644 --- a/src/component/main.vue +++ b/src/component/main.vue @@ -411,14 +411,14 @@ @Watch('state.screen.size') onResize() { const { width, height } = this.state.screen.size - const screen_ratio = width / height + const screenRatio = width / height const { offsetWidth, offsetHeight } = this._component - const canvas_ratio = offsetWidth / offsetHeight + const canvasRatio = offsetWidth / offsetHeight // vertical centering - if (screen_ratio > canvas_ratio) { - const vertical = offsetWidth / screen_ratio + if (screenRatio > canvasRatio) { + const vertical = offsetWidth / screenRatio this._container.style.width = `${offsetWidth}px` this._container.style.height = `${vertical}px` this._container.style.marginTop = `${(offsetHeight - vertical) / 2}px` @@ -430,8 +430,8 @@ }) } // horizontal centering - else if (screen_ratio < canvas_ratio) { - const horizontal = screen_ratio * offsetHeight + else if (screenRatio < canvasRatio) { + const horizontal = screenRatio * offsetHeight this._container.style.width = `${horizontal}px` this._container.style.height = `${offsetHeight}px` this._container.style.marginTop = `0px`