Skip to content

Commit a0d98ae

Browse files
committed
# TODO: Including nudge in th update function [√]
1 parent c691045 commit a0d98ae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

adafruit_displayio_layout/widgets/cartesian.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,10 @@ def update_pointer(self, x: int, y: int) -> None:
469469
:return: None
470470
rtype: None
471471
"""
472-
local_x = int((x - self._xrange[0]) * self._factorx)
473-
local_y = int((self._yrange[0] - y) * self._factory) + self.height
472+
local_x = int((x - self._xrange[0]) * self._factorx) + self._nudge_x
473+
local_y = (
474+
int((self._yrange[0] - y) * self._factory) + self.height + self._nudge_y
475+
)
474476

475477
if local_x >= 0 or local_y <= 100:
476478
if self._update_line:

0 commit comments

Comments
 (0)