Skip to content

Commit 4302df2

Browse files
MeenaBytesRajesh Meena
andauthored
Fixes the increment for Pan buttons (#580)
Co-authored-by: Rajesh Meena <rajesh2902@gmai.cim>
1 parent d6f5ea7 commit 4302df2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/ansys/geometry/core/plotting/widgets/displace_arrows.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,23 @@ def callback(self, state: bool) -> None:
4848

4949
# use the length of the diagonal to adjust the movement speed
5050
if self.direction == CameraPanDirection.XUP:
51-
self.current_camera_pos[0][0] += 0.05 * self.plotter.length
52-
self.current_camera_pos[1][0] += 0.05 * self.plotter.length
53-
elif self.direction == CameraPanDirection.XDOWN:
5451
self.current_camera_pos[0][0] -= 0.05 * self.plotter.length
5552
self.current_camera_pos[1][0] -= 0.05 * self.plotter.length
53+
elif self.direction == CameraPanDirection.XDOWN:
54+
self.current_camera_pos[0][0] += 0.05 * self.plotter.length
55+
self.current_camera_pos[1][0] += 0.05 * self.plotter.length
5656
elif self.direction == CameraPanDirection.YUP:
57-
self.current_camera_pos[0][1] += 0.05 * self.plotter.length
58-
self.current_camera_pos[1][1] += 0.05 * self.plotter.length
59-
elif self.direction == CameraPanDirection.YDOWN:
6057
self.current_camera_pos[0][1] -= 0.05 * self.plotter.length
6158
self.current_camera_pos[1][1] -= 0.05 * self.plotter.length
59+
elif self.direction == CameraPanDirection.YDOWN:
60+
self.current_camera_pos[0][1] += 0.05 * self.plotter.length
61+
self.current_camera_pos[1][1] += 0.05 * self.plotter.length
6262
elif self.direction == CameraPanDirection.ZUP:
63-
self.current_camera_pos[0][2] += 0.05 * self.plotter.length
64-
self.current_camera_pos[1][2] += 0.05 * self.plotter.length
65-
elif self.direction == CameraPanDirection.ZDOWN:
6663
self.current_camera_pos[0][2] -= 0.05 * self.plotter.length
6764
self.current_camera_pos[1][2] -= 0.05 * self.plotter.length
65+
elif self.direction == CameraPanDirection.ZDOWN:
66+
self.current_camera_pos[0][2] += 0.05 * self.plotter.length
67+
self.current_camera_pos[1][2] += 0.05 * self.plotter.length
6868
else: # pragma: no cover
6969
raise NotImplementedError(
7070
f"CameraPanDirection {self.direction.name} is not implemented as a widget."

0 commit comments

Comments
 (0)