You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So far there are two methods bring_to_back() and bring_to_front() that send/bring a mobject in position 0 or -1 of the self.mobjects list.
It would be nice to implements two methods that just send/bring a mobject backwards/forwards of just a position.
For example, say that self.mobjects[i] = mob, self.mobjects[i-1] = mob_l and self.mobjects[i+1] = mob_h. Then, mob.send_backwards() would result in self.mobjects[i-1] = mob, self.mobjects[i]=mob_l and self.mobjects[i+1] = mob_h whereas mob.bring_forward() would result in self.mobjects[i-1] = mob_l, self.mobjects[i]=mob_h and self.mobjects[i+1]= mob. The implementation of such methods would be a trivial swap, I think.
Also, the method bring_to_back() could be renamed to send_to_back(). That could be done by adding a DeprecationWarning inviting the user to use the send_to_back() method and by pointing out that that the bring_to_back() method will be soon removed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So far there are two methods
bring_to_back()
andbring_to_front()
that send/bring a mobject in position 0 or -1 of theself.mobjects
list.It would be nice to implements two methods that just send/bring a mobject backwards/forwards of just a position.
For example, say that
self.mobjects[i] = mob
,self.mobjects[i-1] = mob_l
andself.mobjects[i+1] = mob_h
. Then,mob.send_backwards()
would result inself.mobjects[i-1] = mob, self.mobjects[i]=mob_l
andself.mobjects[i+1] = mob_h
whereasmob.bring_forward()
would result inself.mobjects[i-1] = mob_l
,self.mobjects[i]=mob_h
andself.mobjects[i+1]= mob
. The implementation of such methods would be a trivial swap, I think.Also, the method
bring_to_back()
could be renamed tosend_to_back()
. That could be done by adding a DeprecationWarning inviting the user to use thesend_to_back()
method and by pointing out that that thebring_to_back()
method will be soon removed.Beta Was this translation helpful? Give feedback.
All reactions