From ea301da3a38aa02eaa3a73abe390a4eb99e91b90 Mon Sep 17 00:00:00 2001 From: KDSBrowne Date: Mon, 2 Oct 2023 23:24:20 +0000 Subject: [PATCH] add bounds to presentation zoom changer --- .../imports/ui/components/presentation/component.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/ui/components/presentation/component.jsx b/bigbluebutton-html5/imports/ui/components/presentation/component.jsx index 0a6a5862f8..b6cd8f5ebc 100755 --- a/bigbluebutton-html5/imports/ui/components/presentation/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/component.jsx @@ -504,7 +504,13 @@ class Presentation extends PureComponent { } zoomChanger(zoom) { - this.setState({ zoom }); + let boundZoom = parseInt(zoom); + if (boundZoom < HUNDRED_PERCENT) { + boundZoom = HUNDRED_PERCENT + } else if (boundZoom > MAX_PERCENT) { + boundZoom = MAX_PERCENT + } + this.setState({ zoom: boundZoom }); } fitToWidthHandler() {