mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-08 06:43:49 +00:00
Tweak removal animation in classic list view
This commit is contained in:
parent
91002165af
commit
f3acc92730
@ -63,7 +63,9 @@ ClassicListView.prototype.remove = function(index) {
|
|||||||
targetElement = listElementNode.domNode;
|
targetElement = listElementNode.domNode;
|
||||||
// Get the current height of the tiddler
|
// Get the current height of the tiddler
|
||||||
var currWidth = targetElement.offsetWidth,
|
var currWidth = targetElement.offsetWidth,
|
||||||
currHeight = targetElement.offsetHeight + parseInt(window.getComputedStyle(targetElement).marginTop,10);
|
currMarginBottom = parseInt(window.getComputedStyle(targetElement).marginBottom,10),
|
||||||
|
currMarginTop = parseInt(window.getComputedStyle(targetElement).marginTop,10),
|
||||||
|
currHeight = targetElement.offsetHeight + currMarginTop;
|
||||||
// Attach an event handler for the end of the transition
|
// Attach an event handler for the end of the transition
|
||||||
targetElement.addEventListener($tw.utils.convertEventName("transitionEnd"),function(event) {
|
targetElement.addEventListener($tw.utils.convertEventName("transitionEnd"),function(event) {
|
||||||
if(targetElement.parentNode) {
|
if(targetElement.parentNode) {
|
||||||
@ -74,7 +76,7 @@ ClassicListView.prototype.remove = function(index) {
|
|||||||
$tw.utils.setStyle(targetElement,[
|
$tw.utils.setStyle(targetElement,[
|
||||||
{transition: "none"},
|
{transition: "none"},
|
||||||
{transform: "translateX(0px)"},
|
{transform: "translateX(0px)"},
|
||||||
{marginBottom: "0px"},
|
{marginBottom: currMarginBottom + "px"},
|
||||||
{opacity: "1.0"}
|
{opacity: "1.0"}
|
||||||
]);
|
]);
|
||||||
$tw.utils.forceLayout(targetElement);
|
$tw.utils.forceLayout(targetElement);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user