Changeset 15

Show
Ignore:
Timestamp:
20/04/06 13:58:36 (2 years ago)
Author:
al
Message:

respect should fill in line charts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plotkit/trunk/PlotKit/SweetCanvas.js

    r11 r15  
    165165 
    166166        // faux shadow for firefox 
    167         context.save(); 
    168         if (this.isIE) { 
    169             context.fillStyle = "#cccccc"; 
    170         } 
    171         else { 
    172             context.fillStyle = Color.blackColor().colorWithAlpha(0.2).toRGBString(); 
    173         } 
    174  
    175         context.translate(-1, -2); 
    176         bind(makePath, this)();         
    177         context.fill(); 
     167        if (this.options.shouldFill) { 
     168            context.save(); 
     169            if (this.isIE) { 
     170                context.fillStyle = "#cccccc"; 
     171            } 
     172            else { 
     173                context.fillStyle = Color.blackColor().colorWithAlpha(0.2).toRGBString(); 
     174            } 
     175            context.translate(-1, -2); 
     176            bind(makePath, this)();         
     177            context.fill(); 
     178        } 
    178179        context.restore(); 
    179180 
     
    184185        context.strokeStyle = Color.whiteColor().toRGBString(); 
    185186 
    186         bind(makePath, this)(); 
    187         context.fill(); 
    188         bind(makePath, this)(); 
    189         context.stroke(); 
    190  
     187        if (this.options.shouldFill) { 
     188            bind(makePath, this)(); 
     189            context.fill(); 
     190        } 
     191        if (this.options.shouldStroke) { 
     192            bind(makePath, this)(); 
     193            context.stroke(); 
     194        } 
    191195        context.restore(); 
    192196    }