mirror of
https://github.com/3b1b/manim.git
synced 2025-07-31 22:13:30 +08:00
Add copy cursor position option
This commit is contained in:
@ -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))))
|
||||||
|
Reference in New Issue
Block a user