-
Notifications
You must be signed in to change notification settings - Fork 9
Update errors and fixes #6
Copy link
Copy link
Open
Description
tunghack
opened on Jul 13, 2016
Issue body actions
- When updating an object, you might want to remove and add it back to the tree when it is out of the node's boundary. The conditions you check to do this need to be fixed. In specific, in the update function, (orig.x > node.x + node.w || orig.y > node.y + node.h || orig.x + orig.w < node.x || orig.y + orig.h < node.y ) should be (orig.x >= node.x + node.w || orig.y >= node.y + node.h || orig.x + orig.w <= node.x || orig.y + orig.h <= node.y ). I came across this issue when the new updated object is supposed to be in a node leaf, but the conditions keep it in a node child, which prevents you from updating or removing the object in the future.
- Please fix the missing parameter 'updatedcoords' in the recursive call of update function as someone already pointed out.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels