diff --git a/CHANGELOG.md b/CHANGELOG.md index 02980bd..bb4f8a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.8 + +- **FIXED**: Allow to select empty rect in `QuadTree` example. + ## 0.0.7+1 - **ADDED**: Added `changeSize` method to `QuadTree`. diff --git a/lib/src/collisions/quadtree.dart b/lib/src/collisions/quadtree.dart index 77f4262..54fa0bc 100644 --- a/lib/src/collisions/quadtree.dart +++ b/lib/src/collisions/quadtree.dart @@ -500,7 +500,7 @@ final class QuadTree { /// This method is two times faster than [queryMap] and [query]. /// And should be used when you need only object identifiers. List queryIds(ui.Rect rect) { - if (rect.isEmpty) return const []; + //if (rect.isEmpty) return const []; final root = _root; if (root == null) return const []; @@ -555,7 +555,7 @@ final class QuadTree { /// Query the QuadTree for objects that intersect with the given [rect]. /// Returns a map of object identifiers and their bounds. Map queryMap(ui.Rect rect) { - if (rect.isEmpty) return const {}; + //if (rect.isEmpty) return const {}; final root = _root; if (root == null) return const {}; @@ -625,7 +625,7 @@ final class QuadTree { /// Query the QuadTree for objects that intersect with the given [rect]. /// Returns a buffer of object data. QuadTree$QueryResult query(ui.Rect rect) { - if (rect.isEmpty) return QuadTree$QueryResult._(Float32List(0)); + //if (rect.isEmpty) return QuadTree$QueryResult._(Float32List(0)); final root = _root; if (root == null || isEmpty) return QuadTree$QueryResult._(Float32List(0)); diff --git a/pubspec.yaml b/pubspec.yaml index 25604ba..cbb4e93 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ name: repaint description: > Library for creating and managing a canvas similar to CustomPaint but with more features. -version: 0.0.7+1 +version: 0.0.8 homepage: https://github.com/PlugFox/repaint