From 87986a945d776c3408e321187ce21df1e5fc70d3 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 6 Feb 2013 17:06:48 +0000 Subject: [PATCH] Animation tweaks for classic listview --- core/modules/widgets/list/listviews/classic.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/modules/widgets/list/listviews/classic.js b/core/modules/widgets/list/listviews/classic.js index b2d0e5ce6..7e6efabdc 100644 --- a/core/modules/widgets/list/listviews/classic.js +++ b/core/modules/widgets/list/listviews/classic.js @@ -30,13 +30,14 @@ ClassicListView.prototype.insert = function(index) { var listElementNode = this.listWidget.children[index], targetElement = listElementNode.domNode; // Get the current height of the tiddler - var currHeight = targetElement.offsetHeight + parseInt(window.getComputedStyle(targetElement).marginTop,10); + var currMarginBottom = parseInt(window.getComputedStyle(targetElement).marginBottom,10), + currMarginTop = parseInt(window.getComputedStyle(targetElement).marginTop,10), + currHeight = targetElement.offsetHeight + currMarginTop; // Reset the margin once the transition is over var transitionEventName = $tw.utils.convertEventName("transitionEnd"); targetElement.addEventListener(transitionEventName,function handler(event) { $tw.utils.setStyle(targetElement,[ {transition: "none"}, - {transform: "none"}, {marginBottom: ""} ]); targetElement.removeEventListener(transitionEventName,handler,false); @@ -52,8 +53,7 @@ ClassicListView.prototype.insert = function(index) { $tw.utils.setStyle(targetElement,[ {transition: "opacity " + $tw.config.preferences.animationDurationMs + " ease-in-out, " + "margin-bottom " + $tw.config.preferences.animationDurationMs + " ease-in-out"}, - {transform: "rotateX(0deg)"}, - {marginBottom: "0px"}, + {marginBottom: currMarginBottom + "px"}, {opacity: "1.0"} ]); };