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:
parent
66087085e7
commit
931bea1194
@ -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);
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user