Skip to content

Commit

Permalink
fix: zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
F-star committed Jun 30, 2024
1 parent 7867e79 commit ffc21c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/host_event_manager/host_event_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,12 @@ export class HostEventManager {
if (isZoomOut) {
editor.zoomManager.zoomOut({
center: point,
deltaY: event.deltaY,
});
} else {
editor.zoomManager.zoomIn({
center: point,
deltaY: event.deltaY,
});
}
editor.render();
Expand Down
5 changes: 1 addition & 4 deletions packages/core/src/zoom_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,7 @@ export class ZoomManager {
}

private deltaYToZoomStep(deltaY: number) {
return Math.max(
0.035,
0.12937973 * Math.log(Math.abs(deltaY)) - 0.33227472,
);
return Math.max(0.05, 0.12937973 * Math.log(Math.abs(deltaY)) - 0.33227472);
}

/**
Expand Down

0 comments on commit ffc21c9

Please sign in to comment.