Skip to content

Commit

Permalink
Use constants for byte group
Browse files Browse the repository at this point in the history
  • Loading branch information
jr-k committed Jun 23, 2023
1 parent 58b9554 commit 95b5add
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/binaryview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class BinaryView extends React.Component<
}
}

const byteNumber = i + (j * 8) + (k * 16);
const byteNumber = i + (j * HEX_BYTES_PER_GROUP) + (k * HEX_BYTES_PER_ROW);
const color = this.byteColor(this.props.tree, byteNumber, undefined) || this.props.tree.color;

return (
Expand Down Expand Up @@ -257,7 +257,7 @@ export class BinaryView extends React.Component<
}
}

const color = this.byteColor(this.props.tree, Math.floor(b.offset() / 8), undefined) || this.props.tree.color;
const color = this.byteColor(this.props.tree, Math.floor(b.offset() / HEX_BYTES_PER_GROUP), undefined) || this.props.tree.color;

return (
<span
Expand Down

0 comments on commit 95b5add

Please sign in to comment.