Browse Source

Update ViewShot.java

Henley Kuang 6 years ago
parent
commit
e9ad6aaf77
No account linked to committer's email address
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java

+ 2
- 2
android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java View File

@@ -187,8 +187,8 @@ public class ViewShot implements UIBlock {
187 187
                     if (parentElem == view) {
188 188
                         break;
189 189
                     }
190
-                    parentLeft += parentElem.getLeft();
191
-                    parentTop += parentElem.getTop();
190
+                    left += parentElem.getLeft();
191
+                    top += parentElem.getTop();
192 192
                     parentElem = (View)parentElem.getParent();
193 193
                 }
194 194
                 c.drawBitmap(childBitmapBuffer, left + child.getPaddingLeft(),  top + child.getPaddingTop(), null);