Skip to content

Commit

Permalink
only react to new actors
Browse files Browse the repository at this point in the history
  • Loading branch information
janmonschke committed May 15, 2012
1 parent 5a45421 commit 11b1837
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/views/actor_editor.js
Expand Up @@ -73,8 +73,12 @@ module.exports = View.extend({
this.newActor.draggable({
start : function(){ $(this).addClass('dragging') }
});
var editor = this;
this.workspace.droppable({
drop : this.createActor
drop : function(event, ui){
if($(ui.draggable).hasClass('new'))
editor.createActor(event);
}
});
}
});
2 changes: 1 addition & 1 deletion app/views/templates/actor_editor.eco
@@ -1,6 +1,6 @@
<div class="controls">
<div class="newActor">
<div class="actor">
<div class="actor new">
<div class="name">New Actor</div>
</div>
</div>
Expand Down

0 comments on commit 11b1837

Please sign in to comment.