Skip to content

Commit

Permalink
update animate button embed mode position (#4652)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanweiler92 authored Sep 15, 2023
1 parent 5f74fd1 commit 5adeff0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function AnimationButton(props) {
return `phone-portrait${subdailyID}`;
} if (isMobilePhone && isLandscape) {
return `phone-landscape${subdailyID}`;
} if (((isMobileTablet && isPortrait) || (!isMobilePhone && screenWidth < breakpoints.small)) && isEmbedModeActive) {
} if (((isMobileTablet && isPortrait) || !isMobile || (!isMobilePhone && screenWidth < breakpoints.small)) && isEmbedModeActive) {
return `tablet-portrait${subdailyID}-embed`;
} if ((isMobileTablet && isPortrait) || (!isMobilePhone && screenWidth < breakpoints.small)) {
return `tablet-portrait${subdailyID}`;
Expand All @@ -45,7 +45,7 @@ function AnimationButton(props) {
return (
<div
onClick={clickAnimationButton}
className={isKioskModeActive ? 'd-none' : disabled ? 'wv-disabled-button button-action-group animate-button' : !isMobile ? 'button-action-group animate-button' : `button-action-group mobile-animate-button animate-button-${buttonClass}`}
className={isKioskModeActive ? 'd-none' : disabled ? 'wv-disabled-button button-action-group animate-button' : !isMobile && !isEmbedModeActive ? 'button-action-group animate-button' : `button-action-group mobile-animate-button animate-button-${buttonClass}`}
aria-label={labelText}
>
<div id={buttonId}>
Expand Down Expand Up @@ -78,6 +78,7 @@ AnimationButton.propTypes = {
isMobileTablet: PropTypes.bool,
isMobile: PropTypes.bool,
hasSubdailyLayers: PropTypes.bool,
isEmbedModeActive: PropTypes.bool,
};

export default React.memo(AnimationButton);

0 comments on commit 5adeff0

Please sign in to comment.