Skip to content

Commit

Permalink
* [android] bugfix scroller offset transform twice
Browse files Browse the repository at this point in the history
  • Loading branch information
shanjinde11 authored and sospartan committed Dec 15, 2016
1 parent e8a08c1 commit cd7ad66
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -629,12 +629,10 @@ public void unbindDisappearEvent(WXComponent component) {

@Override
public void scrollTo(WXComponent component,int offset) {
int offsetIntF = (int) WXViewUtils.getRealPxByWidth(offset);

int viewYInScroller=component.getAbsoluteY() - getAbsoluteY();
int viewXInScroller=component.getAbsoluteX() - getAbsoluteX();

scrollBy(viewXInScroller - getScrollX()+offsetIntF,viewYInScroller - getScrollY() + offsetIntF);
scrollBy(viewXInScroller - getScrollX() + offset,viewYInScroller - getScrollY() + offset);
}

/**
Expand Down

0 comments on commit cd7ad66

Please sign in to comment.