mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 13:07:44 +00:00
Bind 'u' to unselection
This commit is contained in:
parent
15a446977f
commit
8cc7616271
1 changed files with 4 additions and 1 deletions
|
|
@ -31,6 +31,7 @@ from manimlib.utils.tex_file_writing import LatexError
|
|||
|
||||
|
||||
SELECT_KEY = 's'
|
||||
UNSELECT_KEY = 'u'
|
||||
GRAB_KEY = 'g'
|
||||
X_GRAB_KEY = 'h'
|
||||
Y_GRAB_KEY = 'v'
|
||||
|
|
@ -302,8 +303,8 @@ class InteractiveScene(Scene):
|
|||
))
|
||||
if len(mobs) == 0:
|
||||
return
|
||||
self.selection.add(*mobs)
|
||||
self.selection.set_animating_status(True)
|
||||
self.selection.add(*mobs)
|
||||
|
||||
def toggle_from_selection(self, *mobjects: Mobject):
|
||||
for mob in mobjects:
|
||||
|
|
@ -448,6 +449,8 @@ class InteractiveScene(Scene):
|
|||
char = chr(symbol)
|
||||
if char == SELECT_KEY and modifiers == 0:
|
||||
self.enable_selection()
|
||||
if char == UNSELECT_KEY:
|
||||
self.clear_selection()
|
||||
elif char in GRAB_KEYS and modifiers == 0:
|
||||
self.prepare_grab()
|
||||
elif char == RESIZE_KEY and modifiers in [0, SHIFT_MODIFIER]:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue