Browse Source

Merge pull request #347 from donandren/fixlayoutscaleios

touch events  ios no scale
pull/372/head
Nikita Tsukanov 11 years ago
parent
commit
aeb28391bc
  1. 7
      src/iOS/Perspex.iOS/PerspexView.cs

7
src/iOS/Perspex.iOS/PerspexView.cs

@ -186,14 +186,11 @@ namespace Perspex.iOS
RawMouseEventType.Move, location, InputModifiers.LeftMouseButton));
else
{
double x = location.X - _touchLastPoint.X;
double y = location.Y - _touchLastPoint.Y;
//magic number based on test - correction of 0.02 is working perfect
double correction = 0.02;
var scale = PerspexLocator.Current.GetService<IPlatformSettings>().RenderScalingFactor;
scale = 1;
Input?.Invoke(new RawMouseWheelEventArgs(PerspexAppDelegate.MouseDevice, (uint)touch.Timestamp,
_inputRoot, location, new Vector(x * correction / scale, y * correction / scale), InputModifiers.LeftMouseButton));
_inputRoot, location, (location - _touchLastPoint)* correction, InputModifiers.LeftMouseButton));
}
_touchLastPoint = location;
}

Loading…
Cancel
Save