uifw/AvKon/aknphysics/src/aknphysics.cpp
branchRCL_3
changeset 55 aecbbf00d063
parent 25 941195f2d488
child 56 d48ab3b357f1
--- a/uifw/AvKon/aknphysics/src/aknphysics.cpp	Thu Aug 19 10:11:06 2010 +0300
+++ b/uifw/AvKon/aknphysics/src/aknphysics.cpp	Tue Aug 31 15:28:30 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009, 2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -426,15 +426,7 @@
                                           const TTime& aStartTime )
     {
     // Check that world really exists
-    if ( iEngine )
-        {
-        if ( ( !iLandscape && iWorldSize.iHeight <= iViewSize.iHeight ) ||
-                ( iLandscape && iWorldSize.iWidth <= iViewSize.iWidth ) )
-            {
-            return EFalse;
-            }
-        }
-    else
+    if ( !iEngine || !iEngine->WorldExists() )
         {
         return EFalse;
         }
@@ -552,14 +544,6 @@
 //
 EXPORT_C void CAknPhysics::RegisterPanningPosition( const TPoint& aDelta )
     {
-    TInt viewSize = !iLandscape ? iViewSize.iHeight : iViewSize.iWidth;
-    TInt worldSize = !iLandscape ? iWorldSize.iHeight : iWorldSize.iWidth;
-    
-    if ( worldSize <= viewSize )
-        {
-        return;
-        }
-	
     TTimeIntervalMicroSeconds time;
     TInt err( KErrNone );
     if ( iNullThread.Handle() )
@@ -605,8 +589,7 @@
     iPanningDrawOmitted = !drawNow;
     
     TPoint position( iObserver.ViewPosition() );
-    
-    TPoint movement( aDelta );
+    position += aDelta;
 
     if ( iRestrictor && iRestrictor->AllowedViewPosition( position ) )
         {
@@ -619,23 +602,6 @@
                 iEngine->StartFpsLogging();
                 }
             }
-
-        // reduce movement if content is dragged over boundaries
-        if ( OngoingPhysicsAction() == EAknPhysicsActionDragging )
-            {
-            TInt currentPosition = !iLandscape ? position.iY : position.iX;
-            TInt* movementPtr = !iLandscape ? &movement.iY : &movement.iX;
-        
-            TInt top = viewSize / 2;
-            TInt bottom = worldSize - top;
-            
-            if ( currentPosition < top || currentPosition > bottom )
-                {
-                *movementPtr /= 2;
-                }
-            }
-
-        position += movement;
         
         NotifyViewPositionChanged( position, drawNow );
         
@@ -931,7 +897,6 @@
 void CAknPhysics::DrawViewInCurrentPosition()
     {
     NotifyViewPositionChanged( iObserver.ViewPosition(), ETrue );
-    iPanningDrawOmitted = EFalse;
     }
 
 // --------------------------------------------------------------------------
@@ -974,6 +939,7 @@
     // Create Physics timer to step physics emulation
     iPhysics = CAknHighResPeriodic::NewL(
         CActive::EPriorityStandard, nullThreadOpen ? &iNullThread : NULL );
+    iPhysics->SetMinCallBackPeriod( FrameDelay() * 1000 );
     
     iEngine = CAknPhysicsEngine::NewL( this );
     iParamProvider = CAknPhysicsParameterProvider::NewL();
@@ -981,7 +947,6 @@
     iConeObserver = CAknPhysicsConeObserver::NewL( this, iRestrictor );
     iConeObserver->SetViewWindowControl( aViewControl );
     iFeedback = MTouchFeedback::Instance();
-    iPhysics->SetMinCallBackPeriod( FrameDelay() * 1000 );
     }
 
 
@@ -1141,7 +1106,7 @@
             if ( iBounceTactileFeedback && iFeedback )
                 {
                 iFeedback->InstantFeedback( NULL,
-                                            ETouchFeedbackBoundaryList,
+                                            ETouchFeedbackBounceEffect,
                                             ETouchFeedbackVibra,
                                             TPointerEvent() );
                 }