mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-04 00:58:53 +00:00
Further refinements to the list mechanism
Much better navigation animation for classic view
This commit is contained in:
@@ -92,20 +92,20 @@ var eventNameMappings = {
|
||||
"transitionEnd": {
|
||||
correspondingCssProperty: "transition",
|
||||
mappings: {
|
||||
transition: "transitionEnd",
|
||||
transition: "transitionend",
|
||||
OTransition: "oTransitionEnd",
|
||||
MSTransition: "msTransitionEnd",
|
||||
MozTransition: "transitionEnd",
|
||||
MozTransition: "transitionend",
|
||||
webkitTransition: "webkitTransitionEnd"
|
||||
}
|
||||
},
|
||||
"animationEnd": {
|
||||
correspondingCssProperty: "animation",
|
||||
mappings: {
|
||||
animation: "animationEnd",
|
||||
animation: "animationend",
|
||||
OAnimation: "oAnimationEnd",
|
||||
MSAnimation: "msAnimationEnd",
|
||||
MozAnimation: "animationEnd",
|
||||
MozAnimation: "animationend",
|
||||
webkitAnimation: "webkitAnimationEnd"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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