Skip to content

Commit

Permalink
fix: spectrum object should include the sourceSelector (#2360)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-musallam authored May 18, 2023
1 parent a4acc6b commit 8d9161b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/data/data1d/Spectrum1D/initiateDatum1D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function initiateDatum1D(
): Spectrum1D {
const { usedColors = {}, filters = [] } = options;

const spectrumObj: Partial<Spectrum1D> = {};
const spectrumObj: Partial<Spectrum1D> = { ...spectrum };
spectrumObj.id = spectrum.id || v4();

spectrumObj.display = {
Expand Down
3 changes: 1 addition & 2 deletions src/data/data2d/Spectrum2D/initiateDatum2D.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import { initiateZones } from './zones/initiateZones';
const defaultMinMax = { z: [], minX: 0, minY: 0, maxX: 0, maxY: 0 };

export function initiateDatum2D(spectrum: any, usedColors = {}): Spectrum2D {
const datum: any = {};
const datum: any = { ...spectrum };

datum.id = spectrum.id || v4();
datum.selector = spectrum?.selector || {};

datum.display = {
isPositiveVisible: true,
Expand Down

0 comments on commit 8d9161b

Please sign in to comment.