Skip to content

Commit

Permalink
feat(voltron): voltron_renderer adapt unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
henryjin0511 committed Nov 10, 2023
1 parent 8950cfa commit 668dadc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions renderer/voltron/lib/render/manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ class RenderManager

double correctPixel(double len) {
var density = ScreenUtil.getInstance().scale;
// 兼容测试用例
density = density <= 0 ? 1.0 : density;
return (len * density).roundToDouble() / density;
}

Expand Down

0 comments on commit 668dadc

Please sign in to comment.