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)); RawMouseEventType.Move, location, InputModifiers.LeftMouseButton));
else else
{ {
double x = location.X - _touchLastPoint.X; //magic number based on test - correction of 0.02 is working perfect
double y = location.Y - _touchLastPoint.Y;
double correction = 0.02; double correction = 0.02;
var scale = PerspexLocator.Current.GetService<IPlatformSettings>().RenderScalingFactor;
scale = 1;
Input?.Invoke(new RawMouseWheelEventArgs(PerspexAppDelegate.MouseDevice, (uint)touch.Timestamp, 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; _touchLastPoint = location;
} }

Loading…
Cancel
Save