fix(spells): <ESC> to cancel spell-casting

This commit is contained in:
Tyler Renelle 2014-01-18 14:15:45 -07:00
parent 7a479098dc
commit a1df41ad81
2 changed files with 5 additions and 6 deletions

View file

@ -180,10 +180,9 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
$rootScope.applyingAction = false;
}
// $rootScope.castCancel = function(){
// debugger
// $rootScope.applyingAction = false;
// $scope.spell = null;
// }
$rootScope.castCancel = function(){
$rootScope.applyingAction = false;
$scope.spell = null;
}
}
]);

View file

@ -1,6 +1,6 @@
doctype 5
//html(ng-app="habitrpg", ng-controller="RootCtrl", ng-class='{"applying-action":applyingAction}', ui-keypress="{27:'castCancel()'}")
html(ng-app="habitrpg", ng-controller="RootCtrl", ng-class='{"applying-action":applyingAction}', ui-keypress="{27:'castCancel()'}")
html(ng-app="habitrpg", ng-controller="RootCtrl", ng-class='{"applying-action":applyingAction}', ui-keyup="{27:'castCancel()'}")
head
title=env.t('titleIndex')