Modify animation

This commit is contained in:
Thomas Nordquist
2019-01-22 15:12:49 +01:00
parent bcd5a32483
commit 796233da18
2 changed files with 3 additions and 3 deletions

View File

@@ -11,10 +11,10 @@
padding: 0;
}
@keyframes example {
0% {background-color: inherit;}
0% {background-color: none;}
25% {background-color: #3f51b5;}
50% {background-color: #3f51b5;}
100% {background-color: inherit;}
100% {background-color: none;}
}
::-webkit-scrollbar {

View File

@@ -171,7 +171,7 @@ class TreeNode extends React.Component<Props, State> {
this.dirtyEdges = this.dirtyMessage = this.dirtySubnodes = false
const shouldStartAnimation = (isDirty && !this.animationDirty) && !this.props.isRoot
const animation = shouldStartAnimation ? { animation: 'example 0.5s' } : {}
const animation = shouldStartAnimation ? { willChange: 'auto', translateZ: 0, animation: 'example 0.5s' } : {}
this.animationDirty = shouldStartAnimation
return (