3b1b / 3b1b/manim

Bug in DecimalNumber().set_value

オープン
#1,623 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
93.8k
フォーク
7.7k
PR マージ指標
PR 指標を取得中

説明

When I use
```py
DecimalNumber().set_value()
```
, its color turns into default color, white.
I just found the problem in the library code:
```py
def set_value(self, number):
move_to_point = self.get_edge_center(self.edge_to_fix)
old_submobjects = self.submobjects
self.set_submobjects_from_number(number)
self.move_to(move_to_point, self.edge_to_fix)
for sm1, sm2 in zip(self.submobjects, old_submobjects):
sm1.match_style(sm2)
return self
```
When self.submobjects is edited, old_submobjects is being edited, too. I think it's supposed to be
```py
old_submobjects = self.submobjects[:]
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。