File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,10 +79,6 @@ cncserver.cmd = {
7979 cncserver . api . pen . move ( next [ 1 ] , cncserver . cmd . cb ) ;
8080 break ;
8181 case "tool" :
82- // Reflect color selection
83- $ ( '#tools .selected' ) . removeClass ( 'selected' ) ;
84- $ ( '#' + next [ 1 ] ) . addClass ( 'selected' ) ;
85-
8682 cncserver . wcb . setMedia ( next [ 1 ] , cncserver . cmd . cb ) ;
8783 break ;
8884 case "up" :
Original file line number Diff line number Diff line change @@ -100,6 +100,11 @@ cncserver.wcb = {
100100 // Save the targeted media (separate from media state)
101101 cncserver . state . mediaTarget = toolName ;
102102
103+ // Visually show the selection
104+ var idName = toolName . indexOf ( 'dip' ) !== - 1 ? toolName . slice ( 0 , - 3 ) : toolName ;
105+ $ ( 'nav#tools a.selected' ) . removeClass ( 'selected' ) ;
106+ $ ( 'nav#tools #' + idName ) . addClass ( 'selected' ) ;
107+
103108 cncserver . wcb . status ( 'Putting some ' + name + ' on the brush...' ) ;
104109 cncserver . api . tools . change ( toolName , function ( d ) {
105110 cncserver . wcb . status ( [ 'There is now ' + name + ' on the brush' ] , d ) ;
You can’t perform that action at this time.
0 commit comments