Skip to content

Commit 3a74ad1

Browse files
authored
[Fix]: Reduce default minimum allowed zoom (#2775)
## Which problem is this PR solving? - fixes #2699 ## Description of the changes - This PR allows reducing the default minimum zoon value so less number of nodes doesn't get too scaled ## How was this change tested? - Manually ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` Signed-off-by: Hariom Gupta <[email protected]>
1 parent d31f177 commit 3a74ad1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/plexus/src/zoom/utils.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ function boundValue(min: number, max: number, value: number) {
3535
function getFittedScale(width: number, height: number, viewWidth: number, viewHeight: number) {
3636
return Math.max(
3737
SCALE_MIN,
38-
Math.min(((1 - SCALE_MARGIN) * viewWidth) / width, ((1 - SCALE_MARGIN) * viewHeight) / height, SCALE_MAX)
38+
Math.min(
39+
((1 - SCALE_MARGIN) * viewWidth) / 1.5 / width,
40+
((1 - SCALE_MARGIN) * viewHeight) / 1.5 / height,
41+
SCALE_MAX
42+
)
3943
);
4044
}
4145

0 commit comments

Comments
 (0)