Commit abc217b
fix(animations): retain triggers values for moved tracked list items (#44578)
when reordering a list with animations the list items lose their current
triggers values, that is because the reordering of an item is implemented
as follows (_note:_ the following implementation has been added in PR #23534)
- the item is removed and marked _setForRemoval_
- the item is re-inserted, and the _setForRemoval_ is changed to _setForMove_
- the player set for animating the removal is destroyed when _setForMove_ is detected
the above steps allow the element not to be animated and to keep its styling but the
triggers values get lost since the removal transition/player has already been initialized,
so this change adds a _previousTriggersValues_ map in the _REMOVAL_FLAG_ field in order to
restore the triggers values if/when the removal turns out to be a move, changing the above steps to:
- the item is removed and marked setForRemoval __and its current triggers values are saved as well__
- the item is re-inserted, and the setForRemoval is changed to setForMove
- the player set for animating the removal is destroyed when setForMove is detected __and the
trigger values are re-applied in the engine's statesByElement map__
resolves #29526
PR Close #445781 parent 919f8ae commit abc217b
File tree
2 files changed
+92
-5
lines changed- packages
- animations/browser/src/render
- core/test/animation
2 files changed
+92
-5
lines changedLines changed: 28 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
| 348 | + | |
347 | 349 | | |
348 | 350 | | |
349 | 351 | | |
| 352 | + | |
350 | 353 | | |
351 | 354 | | |
352 | 355 | | |
| |||
358 | 361 | | |
359 | 362 | | |
360 | 363 | | |
361 | | - | |
| 364 | + | |
362 | 365 | | |
363 | 366 | | |
364 | 367 | | |
| |||
755 | 758 | | |
756 | 759 | | |
757 | 760 | | |
758 | | - | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
759 | 764 | | |
760 | | - | |
761 | | - | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
762 | 772 | | |
763 | 773 | | |
764 | 774 | | |
| |||
991 | 1001 | | |
992 | 1002 | | |
993 | 1003 | | |
994 | | - | |
| 1004 | + | |
| 1005 | + | |
995 | 1006 | | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
996 | 1019 | | |
997 | 1020 | | |
998 | 1021 | | |
| |||
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1644 | 1644 | | |
1645 | 1645 | | |
1646 | 1646 | | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
1647 | 1711 | | |
1648 | 1712 | | |
1649 | 1713 | | |
| |||
0 commit comments