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

RETINA_DISPLAY causes incorrect display on iphone #220

Open
FattusMannus opened this issue Aug 5, 2013 · 1 comment
Open

RETINA_DISPLAY causes incorrect display on iphone #220

FattusMannus opened this issue Aug 5, 2013 · 1 comment

Comments

@FattusMannus
Copy link

I am trying to get a page to scale correctly for mobile devices, but including enchant.js seems to affect the width of the page so it renders incorrectly on iPhone

Example (open on iPhone)

  1. http://www.andrewroberthall.co.uk/temp/width/indexno.html
    ^ This page has no enchant.js included and everything fits nicely inside the view
  2. http://www.andrewroberthall.co.uk/temp/width/index.html
    ^ This is the exact same page with the only change being enchant.js is included. The page is forced too wide and you only see half the view.

This is caused by the RETINA_DISPLAY method in enchant.js setting the viewport width to 640 - commenting this out fixes the issue

@sidestepism
Copy link
Collaborator

報告ありがとうございます。enchant.js は、#enchant-stage 以外のHTML要素、とくに一般的な縦スクロールのページと同じ文章内に使われることを想定していませんので、iframe の中におさめて使ってください。

We're sorry, enchant.js designed to be used in single page without other elements outside canvas, because it will override global property of the entire page. I recommend embed enchant.js app with an <iframe> tag.

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

No branches or pull requests

2 participants