Commit 4267d801 authored by huoshizhe's avatar huoshizhe

fix: 左移错误

parent d01655dc
......@@ -237,7 +237,9 @@ cc.Class({
}
this.curPage += 1
if (this.curPage == this.data.length) this.curPage = 0;
if (this.curPage == this.data.length) {
this.curPage = 0
};
if (this.curPage == 1) {
this.leftNode.active = true
......@@ -258,12 +260,14 @@ cc.Class({
return;
}
this.curPage -= 1
if (this.curPage < 0) this.curPage = 2;
if (this.curPage < 0) {
this.curPage = this.data.length - 1;
}
if (this.curPage == 0) {
this.leftNode.active = false
}
if (this.curPage == this.data.length - 2) {
if (this.curPage == this.data.length - 1) {
this.rightNode.active = true
this.rightNode.scale = 1
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment