mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Add copy cursor position option
This commit is contained in:
parent
bddd9c35ea
commit
cf37f34e1f
1 changed files with 5 additions and 0 deletions
|
@ -507,6 +507,8 @@ class InteractiveScene(Scene):
|
||||||
self.save_selection_to_file()
|
self.save_selection_to_file()
|
||||||
elif char == "d" and modifiers == SHIFT_MODIFIER:
|
elif char == "d" and modifiers == SHIFT_MODIFIER:
|
||||||
self.copy_frame_positioning()
|
self.copy_frame_positioning()
|
||||||
|
elif char == "c" and modifiers == SHIFT_MODIFIER:
|
||||||
|
self.copy_cursor_position()
|
||||||
elif symbol in ARROW_SYMBOLS:
|
elif symbol in ARROW_SYMBOLS:
|
||||||
self.nudge_selection(
|
self.nudge_selection(
|
||||||
vect=[LEFT, UP, RIGHT, DOWN][ARROW_SYMBOLS.index(symbol)],
|
vect=[LEFT, UP, RIGHT, DOWN][ARROW_SYMBOLS.index(symbol)],
|
||||||
|
@ -631,3 +633,6 @@ class InteractiveScene(Scene):
|
||||||
call += ", {:.2f}".format(height)
|
call += ", {:.2f}".format(height)
|
||||||
call += ")"
|
call += ")"
|
||||||
pyperclip.copy(call)
|
pyperclip.copy(call)
|
||||||
|
|
||||||
|
def copy_cursor_position(self):
|
||||||
|
pyperclip.copy(str(tuple(self.mouse_point.get_center().round(2))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue