ManimCommunity / ManimCommunity/manim
ReplacementTransform not working properly with add function
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Description of bug / unexpected behavior
The first text does not disappear and after the and it suddenly disappears and doubled.
## Expected behavior
We expected that the first text disapear and replaced by the second text. When move the square the second text move as well.
## How to reproduce the issue
Code for reproducing the problem
```py
square=Square(side_length=1)
tex=Tex("$\\sqrt{2}+1$")
tex2=Tex("$\\frac{x}{\\sqrt{2}}$")
square.add(tex)
self.play(Write(square))
self.play(ReplacementTransform(tex,tex2),run_time=2)
self.play(ApplyMethod(square.shift,UP*2))
```
## Additional media files
Images/GIFs

Contributor guide
Research direction
Start by running the provided reproduction using Square.add, ReplacementTransform, and ApplyMethod to observe when the first text disappears and whether the replacement moves with the square. Trace those named animation operations and verify that the first text is replaced once and the second text remains attached when the square shifts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100