equal
deleted
inserted
replaced
345 } |
345 } |
346 |
346 |
347 function foreach_onclick(opstr, evt) { |
347 function foreach_onclick(opstr, evt) { |
348 new_item_offset = eval(String(this.item_offset)+opstr) |
348 new_item_offset = eval(String(this.item_offset)+opstr) |
349 if(new_item_offset + this.items.length > this.index_pool.length) { |
349 if(new_item_offset + this.items.length > this.index_pool.length) { |
350 new_item_offset = 0; |
350 if(this.item_offset + this.items.length == this.index_pool.length) |
|
351 new_item_offset = 0; |
|
352 else |
|
353 new_item_offset = this.index_pool.length - this.items.length; |
351 } else if(new_item_offset < 0) { |
354 } else if(new_item_offset < 0) { |
352 new_item_offset = this.index_pool.length - this.items.length; |
355 if(this.item_offset == 0) |
|
356 new_item_offset = this.index_pool.length - this.items.length; |
|
357 else |
|
358 new_item_offset = 0; |
353 } |
359 } |
354 this.item_offset = new_item_offset; |
360 this.item_offset = new_item_offset; |
355 off = this.offset; |
361 off = this.offset; |
356 foreach_unsubscribe.call(this); |
362 foreach_unsubscribe.call(this); |
357 foreach_subscribe.call(this,off); |
363 foreach_subscribe.call(this,off); |