EnyoJS and FirefoxOS screen orientation

EnyoJS and FirefoxOS screen orientation

Today I wanted to implement something in BibleZ NG that depends on the screen orientation (portrait or landscape) of a FxOS device.  Because I don’t use phonegap for this app (maybe later) here is my solution to handle it more EnyoJS-like. I’ve used enyo.Signals to listen for the orientation changed event and than send a custom event that my enyo kinds can listen to.

Put this in your main App.js file:

Listen to this custom event in your other enyo kinds:

This is an example function to handle the different screen orientations:

via

2 Gedanken zu „EnyoJS and FirefoxOS screen orientation

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.