Skip to content

Commit c9309da

Browse files
author
Margaret Matocha
committed
Updated anchored position getter/setter
1 parent 2caeb59 commit c9309da

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

adafruit_display_text/label.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,10 @@ def anchored_position(self):
353353
return (
354354
int(
355355
self.x
356-
+ self._boundingbox[0]
357356
+ self._anchor_point[0] * self._boundingbox[2]
358357
),
359358
int(
360359
self.y
361-
+ self._boundingbox[1]
362360
+ self._anchor_point[1] * self._boundingbox[3]
363361
),
364362
)
@@ -372,7 +370,6 @@ def anchored_position(self, new_position):
372370
new_y = self.y = int(
373371
new_position[1]
374372
- self._anchor_point[1] * (self._boundingbox[3] * self._scale)
375-
+ (self._boundingbox[3] * self._scale) / 2
376373
)
377374
self._boundingbox = (new_x, new_y, self._boundingbox[2], self._boundingbox[3])
378375
self.x = new_x

0 commit comments

Comments
 (0)