Skip to content

Commit

Permalink
fix: update domain in 2D
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-musallam committed Nov 22, 2024
1 parent 28e70a8 commit b860f84
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/component/reducer/actions/FiltersActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,17 +210,20 @@ export type FiltersActions =
| 'APPLY_AUTO_PHASE_CORRECTION_TOW_DIMENSION_FILTER'
>;

const DEFAULT_FILTER_DOMAIN_UPDATE_RULES: FilterDomainUpdateRules = {
updateXDomain: false,
updateYDomain: false,
};

function getFilterUpdateDomainRules(
filterName: string,
defaultRule?: FilterDomainUpdateRules,
defaultRule: FilterDomainUpdateRules = DEFAULT_FILTER_DOMAIN_UPDATE_RULES,
) {
return (
Filters1D[filterName]?.domainUpdateRules ||
defaultRule || {
updateXDomain: false,
updateYDomain: false,
}
);
const filterDomainUpdateRules =
Filters1D?.[filterName]?.domainUpdateRules ??
Filters2D?.[filterName]?.domainUpdateRules;

return filterDomainUpdateRules || defaultRule;
}

export interface RollbackSpectrumByFilterOptions {
Expand Down

0 comments on commit b860f84

Please sign in to comment.