Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow zoom factor in parent window from <iframe> #21

Merged
merged 5 commits into from
Jul 9, 2020

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Jul 8, 2020

When presenting Marpit deck within iframe, our polyfill cannot follow the zoom factor in the parent window. Safari always treats the scaling factor for the slide deck inside frames as 1.

Marp CLI is actually exporting HTML that has a presenter view with the DOM structure like that. The zoom level in browser is important for users to read preseter notes in bigger font.

So I've improved to recognize the zoom factor in the parent frame only if both windows are using polyfill and the child frame can access to the parent safely. (they must have same-origin)

This patch would not resolve all use cases, but at least enough to fix problem for ours tools.

@yhatt yhatt merged commit ff37544 into master Jul 9, 2020
@yhatt yhatt deleted the follow-parent-zoom-factor branch July 9, 2020 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant