From c8ed30fa822ef6bc2f489b539a5ffb9f64ad30f7 Mon Sep 17 00:00:00 2001 From: Jeremie Laval Date: Wed, 21 Nov 2012 13:45:59 +0000 Subject: [macdoc] Remove dead code --- WebViewExtraordinaire.cs | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/WebViewExtraordinaire.cs b/WebViewExtraordinaire.cs index 6806fe2..dc004a4 100644 --- a/WebViewExtraordinaire.cs +++ b/WebViewExtraordinaire.cs @@ -66,35 +66,6 @@ namespace macdoc return; FireSwipeEvent (theEvent.DeltaX > 0 ? SwipeSide.Left : SwipeSide.Right); - - // The following scroll event to swipe event translation is mostly inspired from the following Firefox patch - // https://bugzilla.mozilla.org/attachment.cgi?id=553654&action=diff - // Although it's not working fine for us, let's do our own sauce - /* - // We only take pure swipe event into account that is only - // when the swipe is initiated at the beginning of the touch process - // (put differently a swipe can't happen after a normal scroll and user need, - // to first stop whatever scroll he was doing before attempting a swipe) - if (theEvent.Phase != NSEventPhase.Began) - return; - - // Bit of heuristic to avoid triggering accidental swipes - if (theEvent.DeltaX == 0 || Math.Abs (theEvent.DeltaX) <= Math.Abs (theEvent.DeltaY) * 8) - return; - - NSEventTrackHandler swipeBlock = delegate (float gestureAmount, NSEventPhase eventPhase, bool isComplete, ref bool stop) { - Console.WriteLine ("[{0}] {1} {2} {3}", theEvent.Timestamp, gestureAmount, eventPhase, isComplete); - if (isComplete && gestureAmount != 0) { - FireSwipeEvent (gestureAmount > 0 ? SwipeSide.Left : SwipeSide.Right); - } - }; - - Console.WriteLine ("Tracking {0}", theEvent.Timestamp.ToString ()); - theEvent.TrackSwipeEvent ((NSEventSwipeTrackingOptions)0, - -1, - 1, - swipeBlock); - */ } public override void SwipeWithEvent (NSEvent theEvent) -- cgit v1.2.3