Skip to content

Commit

Permalink
Adjust DomainTileButton dimensions (#2683)
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec authored Oct 10, 2023
1 parent 39518a9 commit 7037c5c
Show file tree
Hide file tree
Showing 4 changed files with 919 additions and 67 deletions.
1 change: 1 addition & 0 deletions src/components/TreeView/TreeDepiction/DomainTileButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export default function DomainTileButton(
width: "95%",
height: "95%",
margin: "2.5%",
padding: "5px",
}}
variant={"outlined"}
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/TreeView/TreeDepiction/TreeDepictionTypes.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { SemanticDomain, SemanticDomainTreeNode } from "api/models";

const MAX_COL_WIDTH = 50; // Max gap.
const MIN_COL_WIDTH = 30; // Multiply this by RATIO_TILE_TO_GAP for min tile width.
export const RATIO_TILE_TO_GAP = 3; // Must be odd.
const MIN_COL_WIDTH = 12; // Multiply this by RATIO_TILE_TO_GAP for min tile width.
export const RATIO_TILE_TO_GAP = 7; // Must be odd.

export function getNumCols(numChildren: number) {
return numChildren * (RATIO_TILE_TO_GAP + 1) - 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ exports[`DomainTileButton renders tile and matches the latest snapshot 1`] = `
"height": "95%",
"left": 0,
"margin": "2.5%",
"padding": "5px",
"width": "95%",
}
}
Expand Down
Loading

0 comments on commit 7037c5c

Please sign in to comment.