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 []
continue unless lc = _.find levelComponents, {original: component.original}
component.config ?= {}
TreemaNode.utils.populateDefaults(component.config, lc.configSchema)
TreemaUtils.populateDefaults(component.config, lc.configSchema)
@lastType = 'component'
@lastOriginal = component.original
@walkDefaults component.config, lc.configSchema.properties
@ -147,7 +147,7 @@ module.exports = class Level extends CocoModel
fillInDefaultSystemConfiguration: (levelSystems) ->
for system in levelSystems ? []
system.config ?= {}
TreemaNode.utils.populateDefaults(system.config, system.model.configSchema)
TreemaUtils.populateDefaults(system.config, system.model.configSchema)
@lastType = 'system'
@lastOriginal = system.model.name
@walkDefaults system.config, system.model.configSchema.properties
@ -165,7 +165,7 @@ module.exports = class Level extends CocoModel
else if schema.type is 'array' and config[prop]
for item in config[prop] or []
@walkDefaults item, schema.items
dimensions: ->
width = 0
height = 0

View file

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

File diff suppressed because one or more lines are too long