Skip to content

Commit 88b4e0f

Browse files
authored
1 parent 9a8a1b8 commit 88b4e0f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

fastplotlib/layouts/_rect.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def _set(self, rect):
2727
raise ValueError(
2828
f"Invalid rect value < 0: {rect}\n All values must be non-negative."
2929
)
30-
3130
if (rect[2:] <= 1).all(): # fractional bbox
3231
self._set_from_fract(rect)
3332

@@ -66,7 +65,6 @@ def _set_from_screen_space(self, rect):
6665
mult = np.array([cw, ch, cw, ch])
6766
# for screen coords allow (x, y) = 1 or 0, but w, h must be > 1
6867
# check that widths, heights are valid
69-
7068
# account for potential x and y offset
7169
rect_offset = rect.copy()
7270
rect_offset[0] -= x_offset
@@ -82,7 +80,7 @@ def _set_from_screen_space(self, rect):
8280
)
8381

8482
self._rect_frac[:] = rect_offset / mult
85-
self._rect_screen_space[:] = rect_offset
83+
self._rect_screen_space[:] = rect
8684

8785
@property
8886
def x(self) -> np.float64:

0 commit comments

Comments
 (0)