add bounds to presentation zoom changer
This commit is contained in:
parent
56edf23a1f
commit
ea301da3a3
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user