Browse Source

Update ViewShot.java

Henley Kuang 6 years ago
parent
commit
e9ad6aaf77
No account linked to committer's email address

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

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