Skip to content

Commit

Permalink
test: update snapshot
Browse files Browse the repository at this point in the history
Signed-off-by: Zxilly <[email protected]>
  • Loading branch information
Zxilly committed Aug 6, 2024
1 parent 57b0b67 commit 76c02a9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 147 deletions.
9 changes: 8 additions & 1 deletion ui/src/Node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ interface RenderAttributes {
display: string;
}

function getTransform(scale: number): string {
function getTransform(scale: number): string | undefined {
if (scale === 1) {
return undefined;
}

return `scale(${scale.toFixed(2)})`;
}

Expand Down Expand Up @@ -102,6 +106,9 @@ export const Node: React.FC<NodeProps> = React.memo((
if (scale > 1) {
scale = Math.sqrt(scale);
}
if (scale === Infinity) {
scale = 1;
}
}

if (scale < 0.7 && fallback) {
Expand Down
Loading

0 comments on commit 76c02a9

Please sign in to comment.