}
distance = CalculateElasticDragLen(reboundSize, offset, distance);
}
- if ((childrenTail_->GetRelativeRect().GetBottom() + distance) <
+ if (childrenTail_->GetRelativeRect().GetBottom() <
+ (listHeight - scrollBlankSize_ - reboundSize - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM))) {
+ distance = 0;
+ } else if ((childrenTail_->GetRelativeRect().GetBottom() + distance) <
(listHeight - scrollBlankSize_ - reboundSize - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM))) {
distance = listHeight - scrollBlankSize_ - reboundSize - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM)
- childrenTail_->GetRelativeRect().GetBottom();
}
}
}
+ // } else {
+ // if (childrenTail_ != nullptr) {
+ // if (isElastic_ && (reboundSize > 0) &&
+ // (childrenTail_->GetRelativeRect().GetBottom() <
+ // (listHeight - scrollBlankSize_ - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM)))) {
+ // int16_t offset = (listHeight - scrollBlankSize_ - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM))
+ // - (childrenTail_->GetRelativeRect().GetBottom());
+ // if (offset > reboundSize) {
+ // offset = reboundSize;
+ // }
+ // distance = CalculateElasticDragLen(reboundSize, offset, distance);
+ // }
+ // if ((childrenTail_->GetRelativeRect().GetBottom() + distance) <
+ // (listHeight - scrollBlankSize_ - reboundSize - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM))) {
+ // distance = listHeight - scrollBlankSize_ - reboundSize - childrenTail_->GetStyle(STYLE_MARGIN_BOTTOM)
+ // - childrenTail_->GetRelativeRect().GetBottom();
+ // }
+ // }
+ // }
return MoveOffset(0, distance);
}