Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor view state #3169

Open
hamed-musallam opened this issue Jul 30, 2024 · 0 comments
Open

refactor view state #3169

hamed-musallam opened this issue Jul 30, 2024 · 0 comments

Comments

@hamed-musallam
Copy link
Member

hamed-musallam commented Jul 30, 2024

Update the current view structure to the new one described, use the following TypeScript interfaces:

export interface ViewNuclei {
  activeSpectra: ActiveSpectrum[] | null;
  selectReferences: string;
}

export interface ViewNuclei1D extends ViewNuclei {
  verticalAlign: VerticalAlignment;
}

export interface ViewNuclei2D extends ViewNuclei {}

export interface ViewSpectra1D {
  ranges: RangeToolState;
  peaks: PeaksViewState;
  integrals: IntegralsViewState;
  // Additional properties as needed
}

export interface ViewSpectra2D {
  zones: ZoneToolState;
  // Additional properties as needed
}

interface ViewState {
  nuclei1D: Partial<Record<Nuclei, ViewNuclei1D>>;
  nuclei2D: Partial<Record<`${Nuclei},${Nuclei}`, ViewNuclei2D>>;
  spectra1D: Record<string, ViewSpectra1D>;
  spectra2D: Record<string, ViewSpectra2D>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant