mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(scroll-view): wrong locationOnScreen rounding
This commit is contained in:
committed by
Martin Yankov
parent
3a7a944ba1
commit
1858cba4ed
@@ -219,8 +219,8 @@ export class ScrollView extends ScrollViewBase {
|
|||||||
const safeArea = this.getSafeArea();
|
const safeArea = this.getSafeArea();
|
||||||
const fullscreen = this.getFullscreenArea();
|
const fullscreen = this.getFullscreenArea();
|
||||||
const locationOnScreen = this.getLocationInWindow();
|
const locationOnScreen = this.getLocationInWindow();
|
||||||
const onScreenLeft = layout.toDevicePixels(layout.round(locationOnScreen.x));
|
const onScreenLeft = layout.round(layout.toDevicePixels(locationOnScreen.x));
|
||||||
const onScreenTop = layout.toDevicePixels(layout.round(locationOnScreen.y));
|
const onScreenTop = layout.round(layout.toDevicePixels(locationOnScreen.y));
|
||||||
|
|
||||||
let left = layout.toDevicePixels(frame.origin.x);
|
let left = layout.toDevicePixels(frame.origin.x);
|
||||||
let top = layout.toDevicePixels(frame.origin.y);
|
let top = layout.toDevicePixels(frame.origin.y);
|
||||||
|
|||||||
Reference in New Issue
Block a user