Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Commit

Permalink
move makeSource() and makeTarget() calls back to EndpointView.prototy…
Browse files Browse the repository at this point in the history
…pe.initialize
  • Loading branch information
justinvdm committed Apr 14, 2015
1 parent 865df7e commit 4bf24d0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions go/base/static/js/src/components/plumbing/endpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@

// the collection of endpoint views that this endpoint is part of
this.collection = options.collection;

if (this.isSource) {
jsPlumb.makeSource(this.$el, _(this).result('plumbSourceOptions'));
}

if (this.isTarget) {
jsPlumb.makeTarget(this.$el, _(this).result('plumbTargetOptions'));
}
},

isConnected: function() {
Expand All @@ -65,14 +73,6 @@

render: function() {
this.collection.appendToView(this);

if (this.isSource) {
jsPlumb.makeSource(this.$el, _(this).result('plumbSourceOptions'));
}

if (this.isTarget) {
jsPlumb.makeTarget(this.$el, _(this).result('plumbTargetOptions'));
}
}
});

Expand Down

0 comments on commit 4bf24d0

Please sign in to comment.