add bounds to presentation zoom changer

This commit is contained in:
KDSBrowne 2023-10-02 23:24:20 +00:00
parent 56edf23a1f
commit ea301da3a3

View File

@ -504,7 +504,13 @@ class Presentation extends PureComponent {
} }
zoomChanger(zoom) { 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() { fitToWidthHandler() {