Skip to content

Commit 6f275d6

Browse files
authored
Merge pull request #8 from PlugFox/bugfix/allow-to-select-empty-rect
Bump version to 0.0.8 and update CHANGELOG. Fixed selection of empty …
2 parents b19543d + ea390dc commit 6f275d6

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.0.8
2+
3+
- **FIXED**: Allow to select empty rect in `QuadTree` example.
4+
15
## 0.0.7+1
26

37
- **ADDED**: Added `changeSize` method to `QuadTree`.

lib/src/collisions/quadtree.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ final class QuadTree {
500500
/// This method is two times faster than [queryMap] and [query].
501501
/// And should be used when you need only object identifiers.
502502
List<int> queryIds(ui.Rect rect) {
503-
if (rect.isEmpty) return const [];
503+
//if (rect.isEmpty) return const [];
504504

505505
final root = _root;
506506
if (root == null) return const [];
@@ -555,7 +555,7 @@ final class QuadTree {
555555
/// Query the QuadTree for objects that intersect with the given [rect].
556556
/// Returns a map of object identifiers and their bounds.
557557
Map<int, ui.Rect> queryMap(ui.Rect rect) {
558-
if (rect.isEmpty) return const {};
558+
//if (rect.isEmpty) return const {};
559559

560560
final root = _root;
561561
if (root == null) return const {};
@@ -625,7 +625,7 @@ final class QuadTree {
625625
/// Query the QuadTree for objects that intersect with the given [rect].
626626
/// Returns a buffer of object data.
627627
QuadTree$QueryResult query(ui.Rect rect) {
628-
if (rect.isEmpty) return QuadTree$QueryResult._(Float32List(0));
628+
//if (rect.isEmpty) return QuadTree$QueryResult._(Float32List(0));
629629

630630
final root = _root;
631631
if (root == null || isEmpty) return QuadTree$QueryResult._(Float32List(0));

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: repaint
33
description: >
44
Library for creating and managing a canvas similar to CustomPaint but with more features.
55
6-
version: 0.0.7+1
6+
version: 0.0.8
77

88
homepage: https://github.com/PlugFox/repaint
99

0 commit comments

Comments
 (0)