(x: number, y: number, shiftKey: boolean)
| 874 | } |
| 875 | |
| 876 | handleClick(x: number, y: number, shiftKey: boolean) { |
| 877 | const [cursor, isCursor] = this.cursorMap.getCursorPositionByCoordinate(x, y) |
| 878 | this.lastYCoordinate = y |
| 879 | this.lastXCoordinate = x |
| 880 | |
| 881 | if (shiftKey) { |
| 882 | const cursorAtStart = |
| 883 | this.cursor && |
| 884 | (this.cursor.lineIndex > cursor.lineIndex |
| 885 | ? true |
| 886 | : this.cursor.lineIndex === cursor.lineIndex && this.cursor.entryIndex > cursor.entryIndex) |
| 887 | this.startMultiSelect(cursorAtStart) |
| 888 | this.updateMultiSelect(cursor, isCursor) |
| 889 | } else { |
| 890 | if (isCursor) { |
| 891 | this.placeCursorPosition(cursor, isCursor, false) |
| 892 | } else { |
| 893 | if (this.isSelectedNodeAtPosition(cursor)) { |
| 894 | this.startEditAtCurrentCursor() |
| 895 | } else { |
| 896 | this.selectNodeAtPosition(cursor) |
| 897 | } |
| 898 | } |
| 899 | } |
| 900 | } |
| 901 | |
| 902 | placeCursorByXYCoordinate(x: number, y: number) { |
| 903 | const [cursor, isCursor] = this.cursorMap.getCursorPositionByCoordinate(x, y) |
no test coverage detected