fix incorrect camera position in mobile - smart layout

This commit is contained in:
Ramon Souza 2021-08-30 08:54:49 -03:00
parent fb6a1456d4
commit a201c873e4

View File

@ -433,7 +433,9 @@ class SmartLayout extends Component {
calculatesMediaBounds(mediaAreaBounds, slideSize, sidebarSize) {
const { layoutContextState } = this.props;
const { input, fullscreen, isRTL } = layoutContextState;
const {
input, fullscreen, isRTL, deviceType,
} = layoutContextState;
const { presentation } = input;
const { isOpen } = presentation;
const mediaBounds = {};
@ -461,7 +463,7 @@ class SmartLayout extends Component {
if (input.cameraDock.numCameras > 0 && !input.cameraDock.isDragging) {
if (slideSize.width !== 0 && slideSize.height !== 0) {
if (slideSize.width < mediaAreaBounds.width) {
if (slideSize.width < mediaAreaBounds.width && deviceType !== DEVICE_TYPE.MOBILE) {
if (slideSize.width < (mediaAreaBounds.width * 0.8)) {
mediaBounds.width = slideSize.width;
} else {