1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-11 18:00:26 +00:00

Fixed iffy scrolling during navigation

This commit is contained in:
Jeremy Ruston 2012-10-26 17:35:03 +01:00
parent 9797c6aada
commit 858fde3b59

View File

@ -39,8 +39,8 @@ Scroller.prototype.scrollIntoView = function(element) {
this.startTime = new Date();
this.startX = scrollPosition.x;
this.startY = scrollPosition.y;
this.endX = elementBounds.left;
this.endY = elementBounds.top;
this.endX = elementBounds.left + scrollPosition.x;
this.endY = elementBounds.top + scrollPosition.y;
if((this.endX < this.startX) || (this.endX > (this.startX + window.innerWidth)) || (this.endY < this.startY) || (this.endY > (this.startY + window.innerHeight))) {
var self = this;
this.timerId = window.setInterval(function() {