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

Questions about using brim #10

Open
ImMyQuest opened this issue Mar 25, 2015 · 2 comments
Open

Questions about using brim #10

ImMyQuest opened this issue Mar 25, 2015 · 2 comments

Comments

@ImMyQuest
Copy link

Hi Gajus,

Couple of questions about brim:-

  1. In the demo index.html you have the test:-

    || platform.ua.indexOf('like Mac OS X') != –1

    Am I reading this correctly, it allows brim to work even though iOS is < 8? What was your intention? I tried the demo on iphone 4 with iOS 7 and did not get the "This demo has been designed for iOS 8." display.

  2. When you establish the scream variable you declare the width for an iPhone 5s like this:-

    scream = gajus.Scream({
        width: {
            portrait: 320,
            landscape: 568
        }
    });

    Does this have any impact on which devices brim works on? The demo seems to work on my iPad2 which is of course 768x1024. Or do I have to specify/target each device’s resolution somehow? If it's not relevant, can I safely call gajus.Scream() without a config?

@colemanfoley
Copy link

I am also curious about the width option in the config. I copied the initialization code from the Quick Start section into my web app, and it seems to work well on iPhone 6 (in the iOS Simulator), but not as well on my iPhone 5c. The Quick Start code actually has a landscape width of 640, while the demo you mentioned has a landscape width of 568. It works better on my iPhone 5C with a landscape width of 568, which makes sense, since that is the iPhone 5C's device-width in landscape.
Point is, in my experience, the width option does matter. I just ended up doing this:

width: {
  portrait: window.screen.width,
  landscape: window.screen.height
}

@ErikAGriffin
Copy link

+1 for clarification on the width config

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

3 participants