mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
wip
This commit is contained in:
@ -12,13 +12,6 @@ export class Platform {
|
||||
return (this._platforms.indexOf(platformName) > -1);
|
||||
}
|
||||
|
||||
platforms(val) {
|
||||
if (arguments.length) {
|
||||
this._platforms = val;
|
||||
}
|
||||
return this._platforms;
|
||||
}
|
||||
|
||||
settings(val) {
|
||||
if (arguments.length) {
|
||||
this._settings = val;
|
||||
@ -39,6 +32,12 @@ export class Platform {
|
||||
this._platforms.push(platformName);
|
||||
}
|
||||
|
||||
platforms() {
|
||||
// get the array of active platforms, which also knows the hierarchy,
|
||||
// with the last one the most important
|
||||
return this._platforms;
|
||||
}
|
||||
|
||||
|
||||
/* Static Methods */
|
||||
static create(app) {
|
||||
@ -81,17 +80,23 @@ export class Platform {
|
||||
|
||||
let platform = new Platform();
|
||||
if (rootNode) {
|
||||
let platformNode = rootNode.child();
|
||||
let platformNode = rootNode;
|
||||
while (platformNode) {
|
||||
insertSuperset(platformNode);
|
||||
platformNode = platformNode.child();
|
||||
}
|
||||
|
||||
platformNode = rootNode.child();
|
||||
platformNode = rootNode;
|
||||
let settings = {};
|
||||
while (platformNode) {
|
||||
// set the array of active platforms with
|
||||
// the last one in the array the most important
|
||||
platform.add(platformNode.name());
|
||||
util.extend(settings, platformNode.settings());
|
||||
|
||||
// copy default platform settings into this platform settings obj
|
||||
settings[platformNode.name()] = util.extend({}, platformNode.settings());
|
||||
|
||||
// go to the next child
|
||||
platformNode = platformNode.child();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user