Skip to content

Commit

Permalink
截流处理
Browse files Browse the repository at this point in the history
  • Loading branch information
pearone committed Sep 8, 2023
1 parent f5aa56b commit 427da25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/react-layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@dpdfe/react-layout",
"description": "react layout",
"author": "pearone stefan-hui",
"version": "2.2.2",
"version": "2.2.3",
"online_version": "2.0.27",
"dev_version": "2.1.21",
"license": "MIT",
Expand Down
12 changes: 6 additions & 6 deletions packages/react-layout/src/component/canvas/layout-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -735,12 +735,12 @@ function compareProps<T>(prev: Readonly<T>, next: Readonly<T>): boolean {
}

/** 截流处理:如果前后两次的高度差小于3,不重绘 */
// if (
// --!prev['is_placeholder'] &&
// Math.abs(prev[key] - next[key]) <= 1
// ) {
// return true;
// }
if (
!prev['is_placeholder'] &&
Math.abs(prev[key] - next[key]) <= 1
) {
return true;
}
}

// --!isEqual(prev[key], next[key]) &&
Expand Down

0 comments on commit 427da25

Please sign in to comment.