commandBinder.service.js 339 B

123456789101112
  1. angular.module('kityminderEditor').service('commandBinder', function() {
  2. return {
  3. bind: function(minder, command, scope) {
  4. minder.on('interactchange', function() {
  5. scope.commandDisabled = minder.queryCommandState(command) === -1;
  6. scope.commandValue = minder.queryCommandValue(command);
  7. scope.$apply();
  8. });
  9. }
  10. };
  11. });