suggest: dynamic height

This commit is contained in:
Joao Moreno
2016-02-05 10:47:08 +01:00
parent 73ee1f8022
commit 63b3bb268d
2 changed files with 20 additions and 12 deletions

View File

@@ -77,6 +77,10 @@ class TraitController {
return result;
}
get(): number[] {
return this.indexes;
}
add(index: number): void {
if (this.contains(index)) {
return;
@@ -145,6 +149,10 @@ export class List<T> implements IDisposable {
indexes.forEach(i => this.view.splice(i, 1, this.view.element(i)));
}
getFocus(): T[] {
return this.focus.get().map(i => this.view.element(i));
}
reveal(index: number, relativeTop?: number): void {
const scrollTop = this.view.getScrollTop();
const elementTop = this.view.elementTop(index);