Skip to content

Commit

Permalink
v2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Comeau committed May 29, 2016
1 parent 0174dab commit 700a833
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-flip-move",
"version": "2.2.0",
"version": "2.2.1",
"description": "Effortless animation between DOM changes (eg. list reordering) using the FLIP technique.",
"main": "lib/index.js",
"files": [
Expand Down
5 changes: 4 additions & 1 deletion src/FlipMove.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,11 @@ class FlipMove extends Component {


getPositionDelta(domNode, key) {
// TEMP: A mystery bug is sometimes causing unnecessary boundingBoxes to
// remain. Until this bug can be solved, this band-aid fix does the job:
const defaultBox = { left: 0, top: 0 };
const newBox = domNode.getBoundingClientRect();
const oldBox = this.boundingBoxes[key];
const oldBox = this.boundingBoxes[key] || defaultBox;
const relativeBox = {
top: newBox.top - this.parentBox.top,
left: newBox.left - this.parentBox.left
Expand Down

0 comments on commit 700a833

Please sign in to comment.