single Host view refresh bug fix

This commit is contained in:
True Zhuanjia
2024-07-14 01:05:40 +08:00
parent 1b5f414c89
commit 01718282ff
4 changed files with 26 additions and 24 deletions
+1 -2
View File
@@ -53,13 +53,12 @@ StreamView *streamView;
previousPoint = latestPoint;
latestPoint = [touch locationInView:streamView];
previousRelativePoint = latestRelativePoint;
if(nativeTouchHandler.XBoundaryReached || nativeTouchHandler.YBoundaryReached){ // reset
if(nativeTouchHandler.BoundaryReached){ // reset
previousRelativePoint.x = halfScreenWidthInPoints;
previousRelativePoint.y = halfScreenHeightInPoints;
}
latestRelativePoint.x = previousRelativePoint.x + pointerVelocityFactor * (latestPoint.x - previousPoint.x);
latestRelativePoint.y = previousRelativePoint.y + pointerVelocityFactor * (latestPoint.y - previousPoint.y);
}
+ (void)initContextWithView:(StreamView *)view andNativeTouchHandler:(NativeTouchHandler*)handler {