(code, id, x, y, ticks)
| 434 | this.onSelected(code); |
| 435 | } |
| 436 | onTouchMoved(code, id, x, y, ticks) { |
| 437 | if ((this.x != x) || (this.y != y)) |
| 438 | this.onTouchSelect(code, x, y); |
| 439 | this.x = x; |
| 440 | this.y = y; |
| 441 | var scroller = this.getScroller(code); |
| 442 | var dx = 0, dy = 0; |
| 443 | if (this.mode != LINE_MODE) { |
| 444 | if (x < scroller.x) |
| 445 | dx = -1; |
| 446 | else if (scroller.x + scroller.width < x) |
| 447 | dx = 1; |
| 448 | } |
| 449 | if (y < scroller.y) |
| 450 | dy = -1; |
| 451 | else if (scroller.y + scroller.height < y) |
| 452 | dy = 1; |
| 453 | if (this.dx != dx) { |
| 454 | this.dx = dx; |
| 455 | this.tx = Date.now(); |
| 456 | } |
| 457 | if (this.dy != dy) { |
| 458 | this.dy = dy; |
| 459 | this.ty = Date.now(); |
| 460 | } |
| 461 | if (dx || dy) |
| 462 | code.start(); |
| 463 | else |
| 464 | code.stop(); |
| 465 | } |
| 466 | onTouchSelect(code, x, y) { |
| 467 | var anchor = this.anchor; |
| 468 | var bounds = code.bounds; |
nothing calls this directly
no test coverage detected