Add GrDiffCursor.moveToLastChunk

The new method is analogous to GrDiffCursor.moveToFirstChunk, and can be used
when navigating backwards through diffs.

Change-Id: I0c53c3247d4b996fe0dcc0df65e5497494d7c9e7
This commit is contained in:
Mayank Kumar
2020-01-23 20:51:01 -08:00
parent 1b8cc9e9f2
commit ecbe22aeef
3 changed files with 23 additions and 0 deletions

View File

@@ -163,6 +163,12 @@
}
}
moveToEnd() {
if (this.stops.length) {
this.setCursor(this.stops[this.stops.length - 1]);
}
}
setCursorAtIndex(index, opt_noScroll) {
this.setCursor(this.stops[index], opt_noScroll);
}