change captions position to not depend on presentation
This commit is contained in:
parent
bc823b84e0
commit
0b26f066e0
@ -739,6 +739,7 @@ class CustomLayout extends Component {
|
||||
.calculatesSidebarNavBounds(sidebarNavWidth.width, sidebarContentWidth.width);
|
||||
const sidebarContentBounds = this
|
||||
.calculatesSidebarContentBounds(sidebarNavWidth.width, sidebarContentWidth.width);
|
||||
const sidebarSize = sidebarContentWidth.width + sidebarNavWidth.width;
|
||||
const mediaAreaBounds = this
|
||||
.calculatesMediaAreaBounds(sidebarNavWidth.width, sidebarContentWidth.width);
|
||||
const navbarBounds = this.calculatesNavbarBounds(mediaAreaBounds);
|
||||
@ -794,9 +795,9 @@ class CustomLayout extends Component {
|
||||
layoutContextDispatch({
|
||||
type: ACTIONS.SET_CAPTIONS_OUTPUT,
|
||||
value: {
|
||||
left: !isRTL ? (mediaBounds.left + captionsMargin) : null,
|
||||
right: isRTL ? (mediaBounds.right + captionsMargin) : null,
|
||||
maxWidth: mediaBounds.width - (captionsMargin * 2),
|
||||
left: !isRTL ? (sidebarSize + captionsMargin) : null,
|
||||
right: isRTL ? (sidebarSize + captionsMargin) : null,
|
||||
maxWidth: mediaAreaBounds.width - (captionsMargin * 2),
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -544,9 +544,9 @@ class PresentationFocusLayout extends Component {
|
||||
layoutContextDispatch({
|
||||
type: ACTIONS.SET_CAPTIONS_OUTPUT,
|
||||
value: {
|
||||
left: !isRTL ? (mediaBounds.left + captionsMargin) : null,
|
||||
right: isRTL ? (mediaBounds.right + captionsMargin) : null,
|
||||
maxWidth: mediaBounds.width - (captionsMargin * 2),
|
||||
left: !isRTL ? (sidebarSize + captionsMargin) : null,
|
||||
right: isRTL ? (sidebarSize + captionsMargin) : null,
|
||||
maxWidth: mediaAreaBounds.width - (captionsMargin * 2),
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -590,9 +590,9 @@ class SmartLayout extends Component {
|
||||
layoutContextDispatch({
|
||||
type: ACTIONS.SET_CAPTIONS_OUTPUT,
|
||||
value: {
|
||||
left: !isRTL ? (mediaBounds.left + captionsMargin) : null,
|
||||
right: isRTL ? (mediaBounds.right + captionsMargin) : null,
|
||||
maxWidth: mediaBounds.width - (captionsMargin * 2),
|
||||
left: !isRTL ? (sidebarSize + captionsMargin) : null,
|
||||
right: isRTL ? (sidebarSize + captionsMargin) : null,
|
||||
maxWidth: mediaAreaBounds.width - (captionsMargin * 2),
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -556,9 +556,9 @@ class VideoFocusLayout extends Component {
|
||||
layoutContextDispatch({
|
||||
type: ACTIONS.SET_CAPTIONS_OUTPUT,
|
||||
value: {
|
||||
left: !isRTL ? (mediaBounds.left + captionsMargin) : null,
|
||||
right: isRTL ? (mediaBounds.right + captionsMargin) : null,
|
||||
maxWidth: mediaBounds.width - (captionsMargin * 2),
|
||||
left: !isRTL ? (sidebarSize + captionsMargin) : null,
|
||||
right: isRTL ? (sidebarSize + captionsMargin) : null,
|
||||
maxWidth: mediaAreaBounds.width - (captionsMargin * 2),
|
||||
},
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user