Skip to content

Instantly share code, notes, and snippets.

@AGoblinKing
Created January 9, 2015 01:35
Show Gist options
  • Save AGoblinKing/6a724f4e9cf31e4db0d6 to your computer and use it in GitHub Desktop.
Save AGoblinKing/6a724f4e9cf31e4db0d6 to your computer and use it in GitHub Desktop.
{
"c" : [ "components/test.js", "components/test2.js"],
"e" : [{
"i" : "test",
"c" : {
"test" : { "test" : true },
"test2" : {}
},
"e" : [{
"i" : "bar",
"n" : "test",
"c" : {
"test" : { "test" : false }
}
}]
}, {
"n" : "blank"
}]
}
@AGoblinKing
Copy link
Author

        attach : function(e, data) {
            var props = JSON.parse(JSON.stringify(this.e.attributes));

            Vx.extend(props, data);

            props.e = e;
            props.c = this;

            this.entitiesAttached.push(e);

            e.c[this.n] = Object.create(this.e);
            Vx.extend(e.c[this.n], props);
            e.c[this.n].call("attached", e);
        }, 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment