(code, x, y)
| 444 | code.stop(); |
| 445 | } |
| 446 | onTouchSelect(code, x, y) { |
| 447 | var anchor = this.anchor; |
| 448 | var bounds = code.bounds; |
| 449 | var offset = code.hitOffset(x - bounds.x, y - bounds.y); |
| 450 | if (this.mode == LINE_MODE) { |
| 451 | if (anchor.from < offset) |
| 452 | offset = code.findLineBreak(offset, true); |
| 453 | else |
| 454 | offset = code.findLineBreak(offset, false); |
| 455 | } |
| 456 | else if (this.mode == WORD_MODE) { |
| 457 | if (anchor.from < offset) |
| 458 | offset = code.findWordBreak(offset, true); |
| 459 | else |
| 460 | offset = code.findWordBreak(offset, false); |
| 461 | } |
| 462 | if (anchor.from < offset) |
| 463 | code.select(anchor.from, offset - anchor.from); |
| 464 | else |
| 465 | code.select(offset, anchor.to - offset); |
| 466 | } |
| 467 | onUndisplayed(code) { |
| 468 | this.notifier.close(); |
| 469 | this.notifier = null; |
no test coverage detected