From 162aa7633e3b6eb9b6d77c331c2ff0d173e29c80 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Tue, 26 Aug 2014 15:40:51 -0700 Subject: [PATCH] Fixed the component and system settings treema, clearing out defaults for properties not being edited. --- app/views/editor/level/components/LevelComponentEditView.coffee | 1 + app/views/editor/level/systems/LevelSystemEditView.coffee | 1 + 2 files changed, 2 insertions(+) diff --git a/app/views/editor/level/components/LevelComponentEditView.coffee b/app/views/editor/level/components/LevelComponentEditView.coffee index c09600241..ffa90ce8b 100644 --- a/app/views/editor/level/components/LevelComponentEditView.coffee +++ b/app/views/editor/level/components/LevelComponentEditView.coffee @@ -49,6 +49,7 @@ module.exports = class LevelComponentEditView extends CocoView schema = _.cloneDeep LevelComponent.schema schema.properties = _.pick schema.properties, (value, key) => key in @editableSettings schema.required = _.intersection schema.required, @editableSettings + schema.default = _.pick schema.default, (value, key) => key in @editableSettings treemaOptions = supermodel: @supermodel diff --git a/app/views/editor/level/systems/LevelSystemEditView.coffee b/app/views/editor/level/systems/LevelSystemEditView.coffee index b1bcf8f67..ebb056ed7 100644 --- a/app/views/editor/level/systems/LevelSystemEditView.coffee +++ b/app/views/editor/level/systems/LevelSystemEditView.coffee @@ -43,6 +43,7 @@ module.exports = class LevelSystemEditView extends CocoView schema = _.cloneDeep LevelSystem.schema schema.properties = _.pick schema.properties, (value, key) => key in @editableSettings schema.required = _.intersection schema.required, @editableSettings + schema.default = _.pick schema.default, (value, key) => key in @editableSettings treemaOptions = supermodel: @supermodel