Skip to content

Commit

Permalink
Merge pull request #2330 from numbersprotocol/fix-camera-zoom-sensiti…
Browse files Browse the repository at this point in the history
…vity

fix(custom-camera): zoom sensitivity
  • Loading branch information
bafu authored Nov 20, 2022
2 parents cbc87cb + 00a5774 commit 9f72049
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/features/home/custom-camera/custom-camera.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ export class CustomCameraService {
async maxZoomFactor(): Promise<number> {
const defaultMaxAvailableZoom = 0;
if (this.isNativePlatform) {
return (await PreviewCamera.maxAvailableZoom()).result;
let maxZoomFactor = (await PreviewCamera.maxAvailableZoom()).result;
const sensitivityFactor = 4;
if (maxZoomFactor > 0) {
maxZoomFactor /= sensitivityFactor;
}
return maxZoomFactor;
}
return Promise.resolve(defaultMaxAvailableZoom);
}
Expand Down

0 comments on commit 9f72049

Please sign in to comment.