Skip to content

Commit

Permalink
Enhancement(main): Show switch HTML button all the time. Originally f…
Browse files Browse the repository at this point in the history
…rom ershwetabansal

This is helpful since the change of view type does not need a selection.
  • Loading branch information
JoelParke committed Jul 24, 2016
1 parent 0d860d0 commit db1f5a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,10 @@ textAngular.directive('textAngularToolbar', [
return scope._parent;
},
isDisabled: function(){
// view selection button is always enabled since it doesn not depend on a selction!
if (this.name === 'html' && scope._parent.startAction) {
return false;
}
// to set your own disabled logic set a function or boolean on the tool called 'disabled'
return ( // this bracket is important as without it it just returns the first bracket and ignores the rest
// when the button's disabled function/value evaluates to true
Expand Down

0 comments on commit db1f5a0

Please sign in to comment.