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
10 changes: 5 additions & 5 deletions lib/src/layer/shared/layer_projection_simplification/state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ mixin ProjectionSimplificationManagement<
///
/// Do not use before invoking [build]. Only necessarily up to date directly
/// after [build] has been invoked.
late Iterable<ProjectedElement> simplifiedElements;
late List<ProjectedElement> simplifiedElements;

Iterable<ProjectedElement>? _cachedProjectedElements;
final _cachedSimplifiedElements = <int, Iterable<ProjectedElement>>{};
List<ProjectedElement>? _cachedProjectedElements;
final _cachedSimplifiedElements = <int, List<ProjectedElement>>{};

double? _devicePixelRatio;

Expand Down Expand Up @@ -89,12 +89,12 @@ mixin ProjectionSimplificationManagement<
}

simplifiedElements =
(_cachedSimplifiedElements[camera.zoom.floor()] ??= _simplifyElements(
_cachedSimplifiedElements[camera.zoom.floor()] ??= _simplifyElements(
camera: camera,
projectedElements: projected,
pixelTolerance: widget.simplificationTolerance,
devicePixelRatio: newDPR,
));
).toList(growable: false);
}

return Builder(
Expand Down
Loading