brim
brim copied to clipboard
Questions about using brim
Hi Gajus,
Couple of questions about brim:-
-
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.
-
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?
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
}
+1 for clarification on the width config