UI: added default value to colorSettings type and default case for colorProcessor
This commit is contained in:
		
							parent
							
								
									c021c64eab
								
							
						
					
					
						commit
						0a9c769afe
					
				@ -65,7 +65,7 @@ export class ColorSettingsPanelComponent extends PageComponent implements OnInit
 | 
			
		||||
  ngOnInit(): void {
 | 
			
		||||
    this.colorSettingsFormGroup = this.fb.group(
 | 
			
		||||
      {
 | 
			
		||||
        type: [this.colorSettings?.type, []],
 | 
			
		||||
        type: [this.colorSettings?.type || ColorType.constant, []],
 | 
			
		||||
        color: [this.colorSettings?.color, []],
 | 
			
		||||
        rangeList: [this.colorSettings?.rangeList, []],
 | 
			
		||||
        colorFunction: [this.colorSettings?.colorFunction, []]
 | 
			
		||||
 | 
			
		||||
@ -161,6 +161,8 @@ export abstract class ColorProcessor {
 | 
			
		||||
        return new RangeColorProcessor(settings);
 | 
			
		||||
      case ColorType.function:
 | 
			
		||||
        return new FunctionColorProcessor(settings);
 | 
			
		||||
      default:
 | 
			
		||||
        return new ConstantColorProcessor(settings);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user