1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-24 02:27:19 +00:00

Make sure newly inserted classic view list elements get their height reset to auto after being animated

This commit is contained in:
Jeremy Ruston 2012-10-26 17:43:52 +01:00
parent 858fde3b59
commit 187b6bfa4d

View File

@ -47,6 +47,12 @@ ClassicListView.prototype.insert = function(index) {
{height: "0px"}
]);
$tw.utils.forceLayout(targetElement);
targetElement.addEventListener($tw.utils.convertEventName("transitionEnd"),function(event) {
$tw.utils.setStyle(targetElement,[
{transition: ""},
{height: "auto"}
]);
},false);
$tw.utils.setStyle(targetElement,[
{transition: $tw.utils.roundTripPropertyName("transform") + " " + $tw.config.preferences.animationDurationMs + " ease-in-out, " +
"opacity " + $tw.config.preferences.animationDurationMs + " ease-out, " +
@ -55,7 +61,6 @@ ClassicListView.prototype.insert = function(index) {
{opacity: "1.0"},
{height: currHeight + "px"}
]);
};
ClassicListView.prototype.remove = function(index) {