Changeset 6023


Ignore:
Timestamp:
18/11/09 15:57:19 (10 years ago)
Author:
pnorton
Message:

Added the option to hide the transparency and bgcolor controls on the UI by adding 'transparent' or 'bgcolor' to the list of hidden display options.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cowsclient/trunk/cowsclient/public/js/layerDisplayOptions.js

    r5993 r6023  
    143143        var currentStyle = this._getCurrentLayerProperty('styles'); 
    144144         
    145         div.appendChild(this._buildGenericDisplayOptions(layerStyles, currentStyle)); 
     145        div.appendChild(this._buildGenericDisplayOptions(layerStyles, currentStyle, hideOptions)); 
    146146         
    147147        // are there any additional display options for this endpoint 
     
    173173    }, 
    174174     
    175     _buildGenericDisplayOptions: function(layerStyles, currentStyle) { 
     175    _buildGenericDisplayOptions: function(layerStyles, currentStyle, hideOptions) { 
    176176        var div = document.createElement('div'); 
    177177         
     
    180180        } 
    181181         
    182         div.appendChild(this._buildDisplayOptionBool({name:'transparent', title:'Transparent Background', defaultValue:'true'})); 
    183         div.appendChild(this._buildDisplayOptionValue({name:'bgcolor', title:'Background Colour', defaultValue:null})); 
     182        if (! Utils.isValueInList('transparent', hideOptions) ) { 
     183            div.appendChild(this._buildDisplayOptionBool({name:'transparent', title:'Transparent Background', defaultValue:'true'})); 
     184        } 
     185         
     186        if (! Utils.isValueInList('bgcolor', hideOptions) ) { 
     187            div.appendChild(this._buildDisplayOptionValue({name:'bgcolor', title:'Background Colour', defaultValue:null})); 
     188        } 
    184189         
    185190        return div; 
Note: See TracChangeset for help on using the changeset viewer.