Skip to content

Commit

Permalink
fix: 修复触摸设备上的裁剪框尺寸显示有多位小数问题
Browse files Browse the repository at this point in the history
  • Loading branch information
likai committed Mar 23, 2024
1 parent 96a88ef commit 0e94907
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/main-entrance/InitData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ export default class InitData {
// 设置裁剪框尺寸
public setCutBoxSize(width: number, height: number) {
if (cutBoxSizeContainer == null) return;
// width和height保留整数
width = Math.floor(width);
height = Math.floor(height);
const childrenPanel = cutBoxSizeContainer.childNodes;
// p标签已存在直接更改文本值即可
if (childrenPanel.length > 0) {
Expand Down

0 comments on commit 0e94907

Please sign in to comment.