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:
parent
858fde3b59
commit
187b6bfa4d
@ -47,6 +47,12 @@ ClassicListView.prototype.insert = function(index) {
|
|||||||
{height: "0px"}
|
{height: "0px"}
|
||||||
]);
|
]);
|
||||||
$tw.utils.forceLayout(targetElement);
|
$tw.utils.forceLayout(targetElement);
|
||||||
|
targetElement.addEventListener($tw.utils.convertEventName("transitionEnd"),function(event) {
|
||||||
|
$tw.utils.setStyle(targetElement,[
|
||||||
|
{transition: ""},
|
||||||
|
{height: "auto"}
|
||||||
|
]);
|
||||||
|
},false);
|
||||||
$tw.utils.setStyle(targetElement,[
|
$tw.utils.setStyle(targetElement,[
|
||||||
{transition: $tw.utils.roundTripPropertyName("transform") + " " + $tw.config.preferences.animationDurationMs + " ease-in-out, " +
|
{transition: $tw.utils.roundTripPropertyName("transform") + " " + $tw.config.preferences.animationDurationMs + " ease-in-out, " +
|
||||||
"opacity " + $tw.config.preferences.animationDurationMs + " ease-out, " +
|
"opacity " + $tw.config.preferences.animationDurationMs + " ease-out, " +
|
||||||
@ -55,7 +61,6 @@ ClassicListView.prototype.insert = function(index) {
|
|||||||
{opacity: "1.0"},
|
{opacity: "1.0"},
|
||||||
{height: currHeight + "px"}
|
{height: currHeight + "px"}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ClassicListView.prototype.remove = function(index) {
|
ClassicListView.prototype.remove = function(index) {
|
||||||
|
Loading…
Reference in New Issue
Block a user