fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
editor: tweaking canvas appearance - removing various indentations
[fnpeditor.git]
/
src
/
fnpjs
/
runner.js
diff --git
a/src/fnpjs/runner.js
b/src/fnpjs/runner.js
index
eeef9f9
..
2f00170
100644
(file)
--- a/
src/fnpjs/runner.js
+++ b/
src/fnpjs/runner.js
@@
-1,4
+1,4
@@
-define(['libs/jquery', 'libs/underscore'
], function($, _
) {
+define(['libs/jquery', 'libs/underscore'
, 'fnpjs/logging/logging'], function($, _, logging
) {
'use strict';
'use strict';
@@
-10,10
+10,10
@@
var Runner = function(app, modules) {
}
var bootstrappedData = {},
}
var bootstrappedData = {},
- options = {},
moduleInstances = {},
eventListeners = [],
moduleInstances = {},
eventListeners = [],
- plugins = [];
+ plugins = [],
+ config;
_.each(_.keys(modules || {}), function(moduleName) {
if(_.contains(app.permissions[moduleName] || [], 'handleEvents')) {
_.each(_.keys(modules || {}), function(moduleName) {
if(_.contains(app.permissions[moduleName] || [], 'handleEvents')) {
@@
-52,12
+52,16
@@
var Runner = function(app, modules) {
} : undefined;
this.getDOM = _.contains(permissions, 'getDOM') ? function() {
} : undefined;
this.getDOM = _.contains(permissions, 'getDOM') ? function() {
- return $(
options
.rootSelector);
+ return $(
config
.rootSelector);
} : undefined;
this.getPlugins = function() {
return plugins;
};
} : undefined;
this.getPlugins = function() {
return plugins;
};
+
+ this.getConfig = function() {
+ return config;
+ };
};
};
@@
-69,10
+73,16
@@
var Runner = function(app, modules) {
plugins.push(plugin);
};
plugins.push(plugin);
};
- this.start = function(_
options
) {
-
options
= _.extend({
+ this.start = function(_
config
) {
+
config
= _.extend({
rootSelector: 'body'
rootSelector: 'body'
- }, _options);
+ }, _config);
+
+
+ if(config.logging) {
+ logging.setConfig(config.logging);
+ }
+
app.initModules.forEach(function(moduleName) {
getModuleInstance(moduleName).start();
});
app.initModules.forEach(function(moduleName) {
getModuleInstance(moduleName).start();
});