computeScrollTo method
Implementation
double computeScrollTo(int destination) {
if (lyricPainters.length <= 0 || this.height == 0) {
return 0;
}
double height = -lyricPainters[0].height / 2;
for (int i = 0; i < lyricPainters.length; i++) {
if (i == destination) {
height += lyricPainters[i].height / 2;
break;
}
height += lyricPainters[i].height;
}
return -(height + offsetScroll);
}