Skip to content

Commit

Permalink
rename to container size to match resolve method
Browse files Browse the repository at this point in the history
TomJGooding committed Jul 24, 2023
1 parent 26314aa commit 33d775a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/textual/css/scalar_animation.py
Original file line number Diff line number Diff line change
@@ -35,12 +35,12 @@ def __init__(
self.easing = easing
self.on_complete = on_complete

parent_size = widget.parent.size
container_size = widget.parent.size
viewport = widget.app.size

# Resolve scalar units to a start and destination size in cells
self.start = getattr(styles, attribute).resolve(parent_size, viewport)
self.destination = value.resolve(parent_size, viewport)
self.start = getattr(styles, attribute).resolve(container_size, viewport)
self.destination = value.resolve(container_size, viewport)

if speed is not None:
distance = self.start.get_distance_to(self.destination)

0 comments on commit 33d775a

Please sign in to comment.