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);
|
.calculatesSidebarNavBounds(sidebarNavWidth.width, sidebarContentWidth.width);
|
||||||
const sidebarContentBounds = this
|
const sidebarContentBounds = this
|
||||||
.calculatesSidebarContentBounds(sidebarNavWidth.width, sidebarContentWidth.width);
|
.calculatesSidebarContentBounds(sidebarNavWidth.width, sidebarContentWidth.width);
|
||||||
|
const sidebarSize = sidebarContentWidth.width + sidebarNavWidth.width;
|
||||||
const mediaAreaBounds = this
|
const mediaAreaBounds = this
|
||||||
.calculatesMediaAreaBounds(sidebarNavWidth.width, sidebarContentWidth.width);
|
.calculatesMediaAreaBounds(sidebarNavWidth.width, sidebarContentWidth.width);
|
||||||
const navbarBounds = this.calculatesNavbarBounds(mediaAreaBounds);
|
const navbarBounds = this.calculatesNavbarBounds(mediaAreaBounds);
|
||||||
@ -794,9 +795,9 @@ class CustomLayout extends Component {
|
|||||||
layoutContextDispatch({
|
layoutContextDispatch({
|
||||||
type: ACTIONS.SET_CAPTIONS_OUTPUT,
|
type: ACTIONS.SET_CAPTIONS_OUTPUT,
|
||||||
value: {
|
value: {
|
||||||
left: !isRTL ? (mediaBounds.left + captionsMargin) : null,
|
left: !isRTL ? (sidebarSize + captionsMargin) : null,
|
||||||
right: isRTL ? (mediaBounds.right + captionsMargin) : null,
|
right: isRTL ? (sidebarSize + captionsMargin) : null,
|
||||||
maxWidth: mediaBounds.width - (captionsMargin * 2),
|
maxWidth: mediaAreaBounds.width - (captionsMargin * 2),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -544,9 +544,9 @@ class PresentationFocusLayout extends Component {
|
|||||||
layoutContextDispatch({
|
layoutContextDispatch({
|
||||||
type: ACTIONS.SET_CAPTIONS_OUTPUT,
|
type: ACTIONS.SET_CAPTIONS_OUTPUT,
|
||||||
value: {
|
value: {
|
||||||
left: !isRTL ? (mediaBounds.left + captionsMargin) : null,
|
left: !isRTL ? (sidebarSize + captionsMargin) : null,
|
||||||
right: isRTL ? (mediaBounds.right + captionsMargin) : null,
|
right: isRTL ? (sidebarSize + captionsMargin) : null,
|
||||||
maxWidth: mediaBounds.width - (captionsMargin * 2),
|
maxWidth: mediaAreaBounds.width - (captionsMargin * 2),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -590,9 +590,9 @@ class SmartLayout extends Component {
|
|||||||
layoutContextDispatch({
|
layoutContextDispatch({
|
||||||
type: ACTIONS.SET_CAPTIONS_OUTPUT,
|
type: ACTIONS.SET_CAPTIONS_OUTPUT,
|
||||||
value: {
|
value: {
|
||||||
left: !isRTL ? (mediaBounds.left + captionsMargin) : null,
|
left: !isRTL ? (sidebarSize + captionsMargin) : null,
|
||||||
right: isRTL ? (mediaBounds.right + captionsMargin) : null,
|
right: isRTL ? (sidebarSize + captionsMargin) : null,
|
||||||
maxWidth: mediaBounds.width - (captionsMargin * 2),
|
maxWidth: mediaAreaBounds.width - (captionsMargin * 2),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -556,9 +556,9 @@ class VideoFocusLayout extends Component {
|
|||||||
layoutContextDispatch({
|
layoutContextDispatch({
|
||||||
type: ACTIONS.SET_CAPTIONS_OUTPUT,
|
type: ACTIONS.SET_CAPTIONS_OUTPUT,
|
||||||
value: {
|
value: {
|
||||||
left: !isRTL ? (mediaBounds.left + captionsMargin) : null,
|
left: !isRTL ? (sidebarSize + captionsMargin) : null,
|
||||||
right: isRTL ? (mediaBounds.right + captionsMargin) : null,
|
right: isRTL ? (sidebarSize + captionsMargin) : null,
|
||||||
maxWidth: mediaBounds.width - (captionsMargin * 2),
|
maxWidth: mediaAreaBounds.width - (captionsMargin * 2),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user