1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-30 07:50:47 +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;
if(!srcRect) {
var scrollPos = $tw.utils.getScrollPosition();
srcRect.width = window.innerWidth;
srcRect.height = window.innerHeight;
srcRect = {
left: scrollPos.x,
top: scrollPos.y,
right: scrollPos.x + srcRect.width,
bottom: scrollPos.y + srcRect.height
right: scrollPos.x + window.innerWidth,
bottom: scrollPos.y + window.innerHeight,
width: window.innerWidth,
height: window.innerHeight
};
};
var dstRect = $tw.utils.getBoundingPageRect(targetElement);

View File

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