瀏覽代碼

Update ViewShot.java

Henley Kuang 6 年之前
父節點
當前提交
e9ad6aaf77
No account linked to committer's email address
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java

+ 2
- 2
android/src/main/java/fr/greweb/reactnativeviewshot/ViewShot.java 查看文件

@@ -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);