Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust DomainTileButton dimensions #2683

Merged
merged 3 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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