往前滑时, 不往后滑

This commit is contained in:
zogodo
2019-12-10 22:29:19 +08:00
parent b1ecd9c87d
commit 524c47b7c1
3 changed files with 2 additions and 3 deletions

View File

@@ -289,7 +289,7 @@ function GetPowerRecord() {
html += "<div class='power_pre' style='height:"+y+"px;left:"+position+"px;'></div>";
position += 1;
}
if (power.powers.length != 0) {
if (power.powers.length != 0 && power_line.scrollWidth - power_line.offsetWidth - power_line.scrollLeft < 10) {
power_line.innerHTML += html;
power_line.scrollTo(power_line.scrollWidth, 0); //滑动到最后
}