Authored by 盖剑秋

Fix ui bug on category selector. reviewed by redding.

... ... @@ -45,7 +45,8 @@ export default class CategorySelector extends Component {
let rowX = rowLayout.x;
let rowWidth = rowLayout.width;
if (rowX + rowWidth < width) {
if (this.scrollContentWidth < width) {
return;
}
// 位于列表头,且x坐标 < 屏幕x中心距离
... ... @@ -55,7 +56,7 @@ export default class CategorySelector extends Component {
}
// 位于列表尾,且(容器宽度-x坐标)< 屏幕x中心距离
if ((this.scrollContentWidth - rowX) < width / 2) {
if ((this.scrollContentWidth - rowX - 10) < width / 2) {
this.listView && this.listView.scrollTo({x: this.scrollContentWidth - width, y: 0, animated: true});
return;
}
... ...