equal
deleted
inserted
replaced
122 iPhysics->RegisterPanningPosition( deltaPoint ); |
122 iPhysics->RegisterPanningPosition( deltaPoint ); |
123 } |
123 } |
124 } |
124 } |
125 else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) |
125 else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) |
126 { |
126 { |
|
127 if ( iFlags.IsClear( EFlagDraggingAllowed ) ) |
|
128 { |
|
129 return; |
|
130 } |
|
131 |
127 iFlags.Clear( EFlagDraggingAllowed ); |
132 iFlags.Clear( EFlagDraggingAllowed ); |
128 TPoint drag( 0, iStartPosition.iY - aPointerEvent.iPosition.iY ); |
133 TPoint drag( 0, iStartPosition.iY - aPointerEvent.iPosition.iY ); |
129 iPhysics->StartPhysics( drag, iStartTime ); |
134 iPhysics->StartPhysics( drag, iStartTime ); |
130 } |
135 } |
131 } |
136 } |
146 void CAknEdwinPhysicsHandler::InitPhysicsL() |
151 void CAknEdwinPhysicsHandler::InitPhysicsL() |
147 { |
152 { |
148 TSize totalSize( iViewRect.Width(), iViewRect.Height() + KMaxWorldSize ); |
153 TSize totalSize( iViewRect.Width(), iViewRect.Height() + KMaxWorldSize ); |
149 TSize viewSize( iViewRect.Width(), iViewRect.Height() ); |
154 TSize viewSize( iViewRect.Width(), iViewRect.Height() ); |
150 |
155 |
|
156 |
|
157 CTextLayout* layout = iEdwin.TextLayout(); |
|
158 |
|
159 if ( layout ) |
|
160 { |
|
161 TInt pixelsAbove = layout->PixelsAboveBand(); |
|
162 if ( pixelsAbove > 0 ) |
|
163 { |
|
164 MoveScrollIndex( -pixelsAbove ); |
|
165 } |
|
166 } |
|
167 |
151 iPhysics->InitPhysicsL( totalSize, viewSize, EFalse ); |
168 iPhysics->InitPhysicsL( totalSize, viewSize, EFalse ); |
152 } |
169 } |
153 |
170 |
154 // --------------------------------------------------------------------------- |
171 // --------------------------------------------------------------------------- |
155 // CAknEdwinPhysicsHandler::MoveScrollIndex |
172 // CAknEdwinPhysicsHandler::MoveScrollIndex |
646 { |
663 { |
647 return ETrue; |
664 return ETrue; |
648 } |
665 } |
649 return EFalse; |
666 return EFalse; |
650 } |
667 } |
|
668 |
|
669 // --------------------------------------------------------------------------- |
|
670 // CAknEdwinPhysicsHandler::DisableDragging |
|
671 // --------------------------------------------------------------------------- |
|
672 // |
|
673 void CAknEdwinPhysicsHandler::DisableDragging() |
|
674 { |
|
675 iFlags.Clear( EFlagDraggingAllowed ); |
|
676 } |
|
677 |