0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-13 04:22:40 +00:00

so much progress

This commit is contained in:
Scott Tolksdorf
2016-04-02 17:33:56 -04:00
parent 263257bfb8
commit cb5b63429e
13 changed files with 304 additions and 115 deletions

View File

@@ -16,22 +16,14 @@ var SheetRenderer = React.createClass({
};
},
/*
augmentProps : function(props, key){
return _.extend({}, props, {
key : key,
data : this.props.characterData,
onChange :
})
},
*/
renderElement : function(node, key){
if(!node.tag) return null;
if(!Parts[node.tag]) throw 'Could Not Find Element: ' + node.tag
return React.createElement(
(Parts[node.tag] ? Parts[node.tag] : node.tag),
Parts[node.tag],
{key : key, ...node.props},
//this.augmentProps(node.props, key),
...this.renderChildren(node.children))
},
renderChildren : function(nodes){
@@ -44,7 +36,6 @@ var SheetRenderer = React.createClass({
try{
var nodes = jsx2json(this.props.code);
nodes = _.map(nodes, (node)=>{
node.props.data = this.props.characterData;
node.props.onChange = (newData)=>{