Skip to content

Commit

Permalink
Merge pull request #56 from andreypopp/0.8.x
Browse files Browse the repository at this point in the history
Mixin Events to Graph.prototype in proto factory.
  • Loading branch information
oliver7654 committed Aug 30, 2013
2 parents 299be92 + cda3d73 commit cb8ca40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ Graph.Prototype = function() {
// Data.Graph.create(node);
// Note: graph create operation should reject creation of duplicate nodes.


_.extend(this, util.Events);

this.create = function(node) {
var op = Operator.ObjectOperation.Create([node.id], node);
return this.apply(op);
Expand Down Expand Up @@ -711,7 +714,7 @@ Graph.Private = function() {

};

Graph.prototype = _.extend(new Graph.Prototype(), util.Events);
Graph.prototype = new Graph.Prototype();

// ObjectOperation Adapter
// ========
Expand Down

0 comments on commit cb8ca40

Please sign in to comment.