mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-07 09:18:06 +00:00
Further refinements to the list mechanism
Much better navigation animation for classic view
This commit is contained in:
@@ -91,6 +91,22 @@ exports.getScrollPosition = function() {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Gets the bounding rectangle of an element in absolute page coordinates
|
||||
*/
|
||||
exports.getBoundingPageRect = function(element) {
|
||||
var scrollPos = $tw.utils.getScrollPosition(),
|
||||
clientRect = element.getBoundingClientRect();
|
||||
return {
|
||||
left: clientRect.left + scrollPos.x,
|
||||
width: clientRect.width,
|
||||
right: clientRect.right + scrollPos.x,
|
||||
top: clientRect.top + scrollPos.y,
|
||||
height: clientRect.height,
|
||||
bottom: clientRect.bottom + scrollPos.y
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
Saves a named password in the browser
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user