Skip to content

Commit db1f5a0

Browse files
committed
Enhancement(main): Show switch HTML button all the time. Originally from ershwetabansal
This is helpful since the change of view type does not need a selection.
1 parent 0d860d0 commit db1f5a0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main.js

+4
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,10 @@ textAngular.directive('textAngularToolbar', [
10011001
return scope._parent;
10021002
},
10031003
isDisabled: function(){
1004+
// view selection button is always enabled since it doesn not depend on a selction!
1005+
if (this.name === 'html' && scope._parent.startAction) {
1006+
return false;
1007+
}
10041008
// to set your own disabled logic set a function or boolean on the tool called 'disabled'
10051009
return ( // this bracket is important as without it it just returns the first bracket and ignores the rest
10061010
// when the button's disabled function/value evaluates to true

0 commit comments

Comments
 (0)