[CCA] Change megapixel title logic in photo resolution settings.
Bug: b/146817189 Test: Manually inspect megapixel title on different device model. Change-Id: I7e771c52ca52b465cd7da34c90b82442cf474882 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2063513 Auto-Submit: Kuo Jen Wei <inker@chromium.org> Reviewed-by: Shik Chen <shik@chromium.org> Commit-Queue: Kuo Jen Wei <inker@chromium.org> Cr-Commit-Position: refs/heads/master@{#742910}
This commit is contained in:
@@ -355,7 +355,8 @@ export class ResolutionSettings extends BaseSettings {
|
||||
* @param {!Resolution} r
|
||||
* @return {number}
|
||||
*/
|
||||
const toMegapixel = (r) => Math.round(r.area / 100000) / 10;
|
||||
const toMegapixel = ({area}) =>
|
||||
area >= 1e6 ? Math.round(area / 1e6) : Math.round(area / 1e5) / 10;
|
||||
const /** number */ d = gcd(r.width, r.height);
|
||||
if (resolutions.some(
|
||||
(findR) => !findR.equals(r) && r.aspectRatioEquals(findR) &&
|
||||
|
Reference in New Issue
Block a user