list: const

This commit is contained in:
Joao Moreno
2016-02-08 08:51:44 +01:00
parent c898b10d39
commit 557ea9514f

View File

@@ -190,11 +190,11 @@ export class List<T> implements IDisposable {
relativeTop = relativeTop > 1 ? 1 : relativeTop;
// y = mx + b
var m = elementHeight - this.view.height;
const m = elementHeight - this.view.height;
this.view.setScrollTop(m * relativeTop + elementTop);
} else {
var viewItemBottom = elementTop + elementHeight;
var wrapperBottom = scrollTop + this.view.height;
const viewItemBottom = elementTop + elementHeight;
const wrapperBottom = scrollTop + this.view.height;
if (elementTop < scrollTop) {
this.view.setScrollTop(elementTop);