Skip to content

Commit

Permalink
refactor: rename type
Browse files Browse the repository at this point in the history
  • Loading branch information
wadjih-bencheikh18 committed Oct 22, 2023
1 parent b54dbd3 commit 4276d66
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/component/1d/multiplicityTree/MultiplicityTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { AssignmentActionsButtons } from '../ranges/AssignmentActionsButtons';
import LevelNode from './LevelNode';
import StringNode from './StringNode';
import TreeNodes from './TreeNodes';
import createTreeNodes, { treeNodeData } from './buildTreeNode';
import createTreeNodes, { TreeNodeData } from './buildTreeNode';

const styles = {
cursor: 'default',
Expand Down Expand Up @@ -163,7 +163,7 @@ interface TreeResult {
width: number;
height: number;
levelHeight: number;
nodes: treeNodeData[];
nodes: TreeNodeData[];
signal: Signal1D;
range: Omit<Range, 'signals'>;
}
Expand All @@ -179,7 +179,7 @@ function getTree(range: Range, spectrum: Spectrum1D, scale) {
let width = 0;
let height = 0;
let levelHeight = 0;
const nodes: treeNodeData[] = [];
const nodes: TreeNodeData[] = [];
let startX = 0;

const { from, to } = range;
Expand Down
5 changes: 3 additions & 2 deletions src/component/1d/multiplicityTree/buildTreeNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ import {

import { TREE_LEVEL_COLORS } from './TreeColors';

export interface treeNodeData {
export interface TreeNodeData {
startX: number;
_startX: number;
ratio: number;
multiplicityIndex: number;
color: string;
}

function createTreeNodes(signal: Signal1D, spectrumData: Spectrum1D) {
function buildTreeNodesData(
multiplicityIndex: number,
jIndices: number[],
treeNodesData: treeNodeData[],
treeNodesData: TreeNodeData[],
startX: number,
) {
if (!signal.multiplicity) {
Expand Down

0 comments on commit 4276d66

Please sign in to comment.