* @param[in] enable Set to @c true to enable the scrolling of the web page, @n
* else @c false
* @exception E_SUCCESS The method is successful.
+ * @remarks This method doesn't affect javascript touch event.
*/
result SetScrollEnabled(bool enable);
bool
_PanningGestureState::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
{
- const Ewk_View_Smart_Data* pSmartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get( __pWebCore->GetWebNativeNode()));
- SysAssertf(pSmartData, "Failed to get webkit smart data.");
+ if (_WebSettingImpl::GetInstance(__pWebCore->GetSetting())->IsScrollEnabled())
+ {
+ const Ewk_View_Smart_Data* pSmartData = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get( __pWebCore->GetWebNativeNode()));
+ SysAssertf(pSmartData, "Failed to get webkit smart data.");
- Ewk_Event_Gesture gestureEvent;
+ Ewk_Event_Gesture gestureEvent;
- Point absPoint(_CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(touchInfo.GetCurrentPosition())));
+ Point absPoint(_CoordinateSystemUtils::ConvertToInteger(__pWebCore->GetAbsoluteCoordinate(touchInfo.GetCurrentPosition())));
- SetGestureEvent(gestureEvent, EWK_GESTURE_PAN, absPoint, Point(0, 0), 0.0, 0);
- pSmartData->api->gesture_move(const_cast<Ewk_View_Smart_Data*>(pSmartData), &gestureEvent);
+ SetGestureEvent(gestureEvent, EWK_GESTURE_PAN, absPoint, Point(0, 0), 0.0, 0);
+ pSmartData->api->gesture_move(const_cast<Ewk_View_Smart_Data*>(pSmartData), &gestureEvent);
+ }
return true;
}
{
if (__pEflWebkit.get())
{
- if (_WebSettingImpl::GetInstance(__pWebSetting.get())->IsScrollEnabled())
- {
- SendTouchEventForJavaScript(touchInfo);
+ SendTouchEventForJavaScript(touchInfo);
- return __pGestureHandler->OnTouchMoved(source, touchInfo);
- }
- else if (__gestureType == WEB_GESTURE_TYPE_TAP)
- {
- return __pGestureHandler->OnTouchMoved(source, touchInfo);
- }
+ return __pGestureHandler->OnTouchMoved(source, touchInfo);
}
return true;