File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -38,15 +38,17 @@ export class PushbuttonElement extends LitElement {
3838
3939  render ( )  { 
4040    const  {  color }  =  this ; 
41+     const  buttonFill  =  this . pressed  ? 'url(#grad-down)'  : 'url(#grad-up)' ; 
42+ 
4143    return  html ` 
4244      < button  
4345        aria-label ="${ color }  pushbutton " 
4446        @mousedown =${ this . down }  
45-         @mouseup =${ this . up }  
47+         @mouseup =${ ( e :  MouseEvent )   =>   ! e . ctrlKey   &&   this . up ( ) }  
4648        @touchstart=${ this . down }  
4749        @touchend=${ this . up }  
4850        @keydown=${ ( e : KeyboardEvent )  =>  SPACE_KEYS . includes ( e . key )  &&  this . down ( ) }  
49-         @keyup=${ ( e : KeyboardEvent )  =>  SPACE_KEYS . includes ( e . key )  &&  this . up ( ) }  
51+         @keyup=${ ( e : KeyboardEvent )  =>  SPACE_KEYS . includes ( e . key )  &&  ! e . ctrlKey   &&   this . up ( ) }  
5052      >  
5153        < svg  
5254          width ="18mm " 
@@ -92,7 +94,7 @@ export class PushbuttonElement extends LitElement {
9294            />  
9395          </ g >  
9496          < g  class ="clickable-element ">  
95-             < circle  class ="button-circle " cx ="6 " cy ="6 " r ="3.822 " fill ="url(#grad-up) " />  
97+             < circle  class ="button-circle " cx ="6 " cy ="6 " r ="3.822 " fill ="${ buttonFill } />  
9698            < circle  
9799              cx ="6 " 
98100              cy ="6 " 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments