mirror of
https://github.com/status-im/react-native.git
synced 2025-02-05 06:04:15 +00:00
Accept double args in ScrollView.scrollTo
Differential Revision: D2623473 fb-gh-sync-id: 8d4156e67f42d050f0f940d69ca534180d5a0b23
This commit is contained in:
parent
201318f949
commit
df36e388f1
@ -60,14 +60,14 @@ public class ReactScrollViewCommandHelper {
|
||||
Assertions.assertNotNull(args);
|
||||
switch (commandType) {
|
||||
case COMMAND_SCROLL_TO: {
|
||||
int destX = Math.round(PixelUtil.toPixelFromDIP(args.getInt(0)));
|
||||
int destY = Math.round(PixelUtil.toPixelFromDIP(args.getInt(1)));
|
||||
int destX = Math.round(PixelUtil.toPixelFromDIP(args.getDouble(0)));
|
||||
int destY = Math.round(PixelUtil.toPixelFromDIP(args.getDouble(1)));
|
||||
viewManager.scrollTo(scrollView, new ScrollToCommandData(destX, destY));
|
||||
return;
|
||||
}
|
||||
case COMMAND_SCROLL_WITHOUT_ANIMATION_TO: {
|
||||
int destX = Math.round(PixelUtil.toPixelFromDIP(args.getInt(0)));
|
||||
int destY = Math.round(PixelUtil.toPixelFromDIP(args.getInt(1)));
|
||||
int destX = Math.round(PixelUtil.toPixelFromDIP(args.getDouble(0)));
|
||||
int destY = Math.round(PixelUtil.toPixelFromDIP(args.getDouble(1)));
|
||||
viewManager.scrollWithoutAnimationTo(scrollView, new ScrollToCommandData(destX, destY));
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user