camerauis/cameraapp/generic/src/CamZoomPane.cpp
changeset 1 f5ec9446e5bf
parent 0 1ddebce53859
child 12 51dda465e618
equal deleted inserted replaced
0:1ddebce53859 1:f5ec9446e5bf
  1007         return EFalse;
  1007         return EFalse;
  1008         }
  1008         }
  1009         
  1009         
  1010     // Only allow drag if the zoom is already active
  1010     // Only allow drag if the zoom is already active
  1011     if ( type == TPointerEvent::EDrag &&
  1011     if ( type == TPointerEvent::EDrag &&
       
  1012             tchZoomArea.Contains( aPointerEvent.iPosition ) &&
  1012          iTouchActive )
  1013          iTouchActive )
  1013         { 
  1014         { 
  1014         TBool ret = StartTouchZoomL( aPointerEvent.iPosition.iY );
  1015         TBool ret = StartTouchZoomL( aPointerEvent.iPosition.iY );
  1015         PRINT( _L( "Camera <= CCamZoomPane::HandlePointerEventL (dragging)" ) );
  1016         PRINT( _L( "Camera <= CCamZoomPane::HandlePointerEventL (dragging)" ) );
  1016         return ret;
  1017         return ret;
  1017         }  
  1018         }  
  1018     
  1019     
  1019     // Clean up when the touch events are stopped
  1020     // Clean up when the touch events are stopped
  1020     if ( type == TPointerEvent::EButton1Up )
  1021     if ( type == TPointerEvent::EButton1Up ||
       
  1022             (type == TPointerEvent::EDrag &&
       
  1023                     !tchZoomArea.Contains( aPointerEvent.iPosition )))
  1021         {
  1024         {
  1022         // don't do anything for stray touches
  1025         // don't do anything for stray touches
  1023         if ( iTouchActive )
  1026         if ( iTouchActive )
  1024             {
  1027             {
  1025             // Key events are no longer blocked
  1028             // Key events are no longer blocked