Skip to content

Commit

Permalink
Some tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
edlu77 committed Apr 12, 2024
1 parent b348eac commit 149810a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const DEFAULT_SETTINGS: VisualizationSettings = {
colorMap: {},
};

const DEFAULT_CELL_TYPE = 'endothelial';

@Component({
selector: 'cde-create-visualization-page',
standalone: true,
Expand Down Expand Up @@ -50,22 +52,22 @@ export class CreateVisualizationPageComponent {

@ViewChild('colorMapInput') colorMapInput!: ElementRef<HTMLElement>;

defaultCellType = 'type a';
defaultCellType = DEFAULT_CELL_TYPE;

settings: VisualizationSettings = DEFAULT_SETTINGS;

visualizationForm = new FormGroup({
anchorCellType: new FormControl<string>(this.defaultCellType),
anchorCellType: new FormControl(this.defaultCellType),
metadata: new FormGroup({
title: new FormControl<string>(''),
technology: new FormControl<string>(''),
organ: new FormControl<string>(''),
sex: new FormControl<string>('female'),
age: new FormControl<number>(NaN),
thickness: new FormControl<number>(NaN),
pixelSize: new FormControl<number>(NaN),
title: new FormControl(),
technology: new FormControl(),
organ: new FormControl(),
sex: new FormControl('female'),
age: new FormControl(),
thickness: new FormControl(),
pixelSize: new FormControl(),
}),
colorMapOption: new FormControl<string>('default'),
colorMapOption: new FormControl('default'),
});

dataUploaded = false;
Expand Down Expand Up @@ -122,7 +124,6 @@ export class CreateVisualizationPageComponent {
this.dataUploaded = false;
} else {
this.colorMapUploaded = false;
this.toggleDefaultColorMap();
}
}

Expand Down
2 changes: 1 addition & 1 deletion apps/cde-ui/src/app/services/file-upload-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class FileUploadService {
if (type === 'data') {
this.data.set([]);
} else {
this.colorMap.set({});
this.useDefaultColors();
}
}

Expand Down

0 comments on commit 149810a

Please sign in to comment.