mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-31 23:53:00 +00:00
Fix up some problems when the animation duration is zero
We want to be able to suppress animations by making the duration zero
This commit is contained in:
@@ -27,7 +27,7 @@ Notifier.prototype.display = function(title,options) {
|
||||
// Create the wrapper divs
|
||||
var notification = document.createElement("div"),
|
||||
tiddler = this.wiki.getTiddler(title),
|
||||
d = $tw.utils.getAnimationDuration() + "ms";
|
||||
duration = $tw.utils.getAnimationDuration();
|
||||
// Don't do anything if the tiddler doesn't exist
|
||||
if(!tiddler) {
|
||||
return;
|
||||
@@ -47,7 +47,7 @@ Notifier.prototype.display = function(title,options) {
|
||||
{opacity: "0"},
|
||||
{transformOrigin: "0% 0%"},
|
||||
{transform: "translateY(" + (-window.innerHeight) + "px)"},
|
||||
{transition: "opacity " + d + " ease-out, " + $tw.utils.roundTripPropertyName("transform") + " " + d + " ease-in-out"}
|
||||
{transition: "opacity " + duration + "ms ease-out, " + $tw.utils.roundTripPropertyName("transform") + " " + duration + "ms ease-in-out"}
|
||||
]);
|
||||
// Add the notification to the DOM
|
||||
document.body.appendChild(notification);
|
||||
|
||||
Reference in New Issue
Block a user