use white as default bgcolor in manifest, map unknown orientation values to 'any', address some issues raised in #32
diff --git a/bin/template/cordova/Api.js b/bin/template/cordova/Api.js
index 3b1ea8e..9858366 100644
--- a/bin/template/cordova/Api.js
+++ b/bin/template/cordova/Api.js
@@ -162,7 +162,7 @@
}
else {
var manifestJson = {
- "background_color": "#000",
+ "background_color": "#FFF",
"display": "standalone"
};
if(this.config){
@@ -208,8 +208,14 @@
// orientation
// <preference name="Orientation" value="landscape" />
var oriPref = this.config.getGlobalPreference('Orientation');
- if(oriPref && ["landscape","portrait"].indexOf(oriPref) > -1) {
- manifestJson.orientation = oriPref;
+ if(oriPref) {
+ // if it's a supported value, use it
+ if(["landscape","portrait"].indexOf(oriPref) > -1) {
+ manifestJson.orientation = oriPref;
+ }
+ else { // anything else maps to 'any'
+ manifestJson.orientation = 'any';
+ }
}
// get start_url