Skip to content

Commit

Permalink
Toggle desktop attribute. (#35772)
Browse files Browse the repository at this point in the history
  • Loading branch information
processprocess committed Aug 23, 2021
1 parent c8bbc35 commit 3de45dc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions extensions/amp-story/1.0/amp-story-embedded-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -870,9 +870,12 @@ export class AmpStoryEmbeddedComponent {
this.mutator_.mutateElement(
dev().assertElement(this.focusedStateOverlay_),
() => {
[UIType.DESKTOP_FULLBLEED, UIType.DESKTOP_PANELS].includes(uiState)
? this.focusedStateOverlay_.setAttribute('desktop', '')
: this.focusedStateOverlay_.removeAttribute('desktop');
const isDesktop = [
UIType.DESKTOP_FULLBLEED,
UIType.DESKTOP_PANELS,
UIType.DESKTOP_ONE_PANEL,
].includes(uiState);
this.focusedStateOverlay_.toggleAttribute('desktop', isDesktop);
}
);
}
Expand Down

0 comments on commit 3de45dc

Please sign in to comment.