From f7a82ccdf708c007416ba72a1bb880153ec29228 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Mon, 21 Nov 2022 20:46:51 +0100 Subject: [PATCH] re-add missing method --- .../PanelComponents/VideoSettings/ZoomOptionsPanel.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/csui/src/PlayerUiPanels/PanelComponents/VideoSettings/ZoomOptionsPanel.vue b/src/csui/src/PlayerUiPanels/PanelComponents/VideoSettings/ZoomOptionsPanel.vue index a7ea7b9..d613ef7 100644 --- a/src/csui/src/PlayerUiPanels/PanelComponents/VideoSettings/ZoomOptionsPanel.vue +++ b/src/csui/src/PlayerUiPanels/PanelComponents/VideoSettings/ZoomOptionsPanel.vue @@ -108,6 +108,12 @@ export default { 'isEditing' ], methods: { + getZoomForDisplay(axis) { + // zoom is internally handled logarithmically, because we want to have x0.5, x1, x2, x4 ... magnifications + // spaced out at regular intervals. When displaying, we need to convert that to non-logarithmic values. + + return `${(Math.pow(2, this.zoom[axis]) * 100).toFixed()}%` + }, toggleZoomAr() { this.zoomAspectRatioLocked = !this.zoomAspectRatioLocked; },