1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 20:10:03 +00:00

Fixes to classic and sideways list views

This commit is contained in:
Jeremy Ruston 2012-10-28 14:13:38 +00:00
parent 66087085e7
commit 931bea1194
2 changed files with 8 additions and 8 deletions

View File

@ -32,13 +32,13 @@ ClassicListView.prototype.navigateTo = function(historyInfo) {
var srcRect = historyInfo.fromPageRect; var srcRect = historyInfo.fromPageRect;
if(!srcRect) { if(!srcRect) {
var scrollPos = $tw.utils.getScrollPosition(); var scrollPos = $tw.utils.getScrollPosition();
srcRect.width = window.innerWidth;
srcRect.height = window.innerHeight;
srcRect = { srcRect = {
left: scrollPos.x, left: scrollPos.x,
top: scrollPos.y, top: scrollPos.y,
right: scrollPos.x + srcRect.width, right: scrollPos.x + window.innerWidth,
bottom: scrollPos.y + srcRect.height bottom: scrollPos.y + window.innerHeight,
width: window.innerWidth,
height: window.innerHeight
}; };
}; };
var dstRect = $tw.utils.getBoundingPageRect(targetElement); var dstRect = $tw.utils.getBoundingPageRect(targetElement);

View File

@ -25,13 +25,13 @@ SidewaysListView.prototype.navigateTo = function(historyInfo) {
var srcRect = historyInfo.fromPageRect; var srcRect = historyInfo.fromPageRect;
if(!srcRect) { if(!srcRect) {
var scrollPos = $tw.utils.getScrollPosition(); var scrollPos = $tw.utils.getScrollPosition();
srcRect.width = window.innerWidth;
srcRect.height = window.innerHeight;
srcRect = { srcRect = {
left: scrollPos.x, left: scrollPos.x,
top: scrollPos.y, top: scrollPos.y,
right: scrollPos.x + srcRect.width, right: scrollPos.x + window.innerWidth,
bottom: scrollPos.y + srcRect.height bottom: scrollPos.y + window.innerHeight,
width: window.innerWidth,
height: window.innerHeight
}; };
}; };
var dstRect = $tw.utils.getBoundingPageRect(targetElement); var dstRect = $tw.utils.getBoundingPageRect(targetElement);