perf: 优化 UI
This commit is contained in:
@@ -980,7 +980,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -176.293,
|
||||
"x": -233.245,
|
||||
"y": 120.83,
|
||||
"z": 0
|
||||
},
|
||||
|
||||
@@ -195,13 +195,16 @@ export class PassModal extends BaseModal {
|
||||
|
||||
/**
|
||||
* 规范化进度值
|
||||
* 九宫格 Bar 的 Left+Right border = 240px,totalLength = 925px
|
||||
* 当 width < 240px 时圆角会畸变,因此 progress > 0 时强制最小值
|
||||
*/
|
||||
private _normalizeProgress(progress: number): number {
|
||||
if (!Number.isFinite(progress)) {
|
||||
if (!Number.isFinite(progress) || progress <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return Math.max(0, Math.min(1, progress));
|
||||
const MIN_PROGRESS = 240 / 925;
|
||||
return Math.max(MIN_PROGRESS, Math.min(1, progress));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2007,7 +2007,7 @@
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_isTrimmedMode": false,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
|
||||
Reference in New Issue
Block a user