Lay out each chat once per center stage move and record the feature
This commit is contained in:
@@ -95,8 +95,11 @@ class ChatCenterStageMotion {
|
||||
_controller.forward(from: 0);
|
||||
}
|
||||
|
||||
/// Where [id] paints now, or null when this motion does not place it.
|
||||
/// Where [id] paints now, or null when this motion does not place it: at
|
||||
/// rest in the split layout the workspace's own geometry (and its pane-move
|
||||
/// glide) applies.
|
||||
Rect? rectFor(String id) {
|
||||
if (_stage == null && !isAnimating) return null;
|
||||
final to = _to[id];
|
||||
if (to == null) return null;
|
||||
if (!isAnimating) return to;
|
||||
@@ -111,11 +114,13 @@ class ChatCenterStageMotion {
|
||||
return lerpDouble(from, to, _t)!;
|
||||
}
|
||||
|
||||
/// A strip keeps its chat laid out at a usable width beneath the title, so
|
||||
/// the transcript never reflows into a sliver.
|
||||
/// The size [id]'s chat is laid out at. A strip keeps its chat at a usable
|
||||
/// width beneath the title, so the transcript never reflows into a sliver.
|
||||
/// While moving, each chat is laid out once at its destination size and only
|
||||
/// its clipped, painted rectangle travels: no transcript relayout per frame.
|
||||
Size? viewportFor(String id) {
|
||||
if (_role == null || (_stage == null && !isAnimating)) return null;
|
||||
final rect = rectFor(id);
|
||||
final rect = _to[id];
|
||||
if (rect == null) return null;
|
||||
return Size(math.max(rect.width, chatPaneMinimumWidth), rect.height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user