Skip to content

Commit

Permalink
Refactor according to @LFDM's comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Christof committed Jun 17, 2015
1 parent 313d1fc commit d3fb885
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions app/js/arethusa.dep_tree/dep_tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ angular.module('arethusa.depTree').service('depTree', [
state.change(token, 'head.id', rootId);
};

this.makeHead = function(token) {
angular.forEach(Object.keys(state.clickedTokens), function(clickedToken) {
state.change(clickedToken, 'head.id', token.id);
});
};

function getHeadsToChange(token) {
var sentenceId = token.sentenceId;
var id = token.id;
Expand Down
2 changes: 1 addition & 1 deletion app/templates/arethusa.dep_tree/context_menu.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="button-group">
<span class="button micro radius" ng-click="plugin.disconnect(token)" translate="tree.disconnect" />
<span class="button micro radius" ng-click="plugin.toRoot(token)" translate="tree.toRoot" />
<span class="button micro radius" ng-click="plugin.makeHead(token)" translate="tree.makeHead" />
<span class="button micro radius" ng-click="plugin.changeHead(token.id)" translate="tree.makeHead" />
</div>

0 comments on commit d3fb885

Please sign in to comment.