Tangram-iOS icon indicating copy to clipboard operation
Tangram-iOS copied to clipboard

Layout 布局提供设置项回避浮点数宽高

Open HarrisonXi opened this issue 7 years ago • 0 comments

部分组件在宽高为浮点数时边缘绘制可能存在问题,需要在 Layout 层布局时处理掉此问题。

目前考虑采用各区域右侧补 & 左侧裁的四舍五入方法,即 375 宽度双列布局结果:

375 = 188 + 187

第一个元素 left = 0, right = 187.5,右侧补到 188

第二个元素 left = 187.5, right = 375,左侧裁剪到从 188 开始

HarrisonXi avatar Dec 11 '17 07:12 HarrisonXi