Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions fastplotlib/layouts/_rect.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def _set(self, rect):
raise ValueError(
f"Invalid rect value < 0: {rect}\n All values must be non-negative."
)

if (rect[2:] <= 1).all(): # fractional bbox
self._set_from_fract(rect)

Expand Down Expand Up @@ -66,7 +65,6 @@ def _set_from_screen_space(self, rect):
mult = np.array([cw, ch, cw, ch])
# for screen coords allow (x, y) = 1 or 0, but w, h must be > 1
# check that widths, heights are valid

# account for potential x and y offset
rect_offset = rect.copy()
rect_offset[0] -= x_offset
Expand All @@ -82,7 +80,7 @@ def _set_from_screen_space(self, rect):
)

self._rect_frac[:] = rect_offset / mult
self._rect_screen_space[:] = rect_offset
self._rect_screen_space[:] = rect

@property
def x(self) -> np.float64:
Expand Down
Loading