Skip to content

Commit

Permalink
adjust zoom sensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbof committed Aug 26, 2024
1 parent 4a81222 commit 88aec73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/app/script/klecks/ui/easel/easel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,9 @@ export class Easel<GToolId extends string> {
}
e.deltaY *= factor;
}
if (this.keyListener.isPressed('shift')) {
e.deltaY /= 4;
}
// zoom
const transform = this.viewport.getTransform();
const viewportPoint = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/script/klecks/ui/easel/tools/easel-zoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class EaselZoom implements TEaselTool {
const canvasPoint = applyToPoint(inverse(mat), viewportPoint);
const dX = e.relX - this.downPos.x;
const newScale = BB.clamp(
this.downTransform.scale * Math.pow(1 + 1 / 175, dX),
this.downTransform.scale * Math.pow(1 + 1 / 400, dX),
this.easel.minScale,
this.easel.maxScale,
);
Expand Down

0 comments on commit 88aec73

Please sign in to comment.