This commit is contained in:
Nick Winter 2014-08-29 17:18:03 -07:00
parent 3f6c9c4f02
commit b918f5adfb
3 changed files with 35 additions and 79 deletions

View file

@ -139,7 +139,7 @@ module.exports = class Level extends CocoModel
for component in thang.components or [] for component in thang.components or []
continue unless lc = _.find levelComponents, {original: component.original} continue unless lc = _.find levelComponents, {original: component.original}
component.config ?= {} component.config ?= {}
TreemaNode.utils.populateDefaults(component.config, lc.configSchema) TreemaUtils.populateDefaults(component.config, lc.configSchema)
@lastType = 'component' @lastType = 'component'
@lastOriginal = component.original @lastOriginal = component.original
@walkDefaults component.config, lc.configSchema.properties @walkDefaults component.config, lc.configSchema.properties
@ -147,7 +147,7 @@ module.exports = class Level extends CocoModel
fillInDefaultSystemConfiguration: (levelSystems) -> fillInDefaultSystemConfiguration: (levelSystems) ->
for system in levelSystems ? [] for system in levelSystems ? []
system.config ?= {} system.config ?= {}
TreemaNode.utils.populateDefaults(system.config, system.model.configSchema) TreemaUtils.populateDefaults(system.config, system.model.configSchema)
@lastType = 'system' @lastType = 'system'
@lastOriginal = system.model.name @lastOriginal = system.model.name
@walkDefaults system.config, system.model.configSchema.properties @walkDefaults system.config, system.model.configSchema.properties

View file

@ -42,6 +42,7 @@ Worker::removeEventListener = (what) ->
if what is 'message' if what is 'message'
@onmessage = -> #This webworker api has only one event listener at a time. @onmessage = -> #This webworker api has only one event listener at a time.
GLOBAL.tv4 = require('tv4').tv4 GLOBAL.tv4 = require('tv4').tv4
GLOBAL.TreemaUtils = require './bower_components/treema/treema-utils.js'
GLOBAL.marked = setOptions: -> GLOBAL.marked = setOptions: ->
store = {} store = {}
GLOBAL.localStorage = GLOBAL.localStorage =

File diff suppressed because one or more lines are too long