scrollView.SetParentOrigin( ParentOrigin::CENTER );
scrollView.SetAnchorPoint( AnchorPoint::CENTER );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
scrollView.SetParentOrigin( ParentOrigin::CENTER );
scrollView.SetAnchorPoint( AnchorPoint::CENTER );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
- rulerMap.Add( ScrollMode::X_AXIS_SNAP_TO_INTERVAL, pageSize.width );
- rulerMap.Add( ScrollMode::X_AXIS_SCROLL_BOUNDARY, pageSize.width*3 );
+ rulerMap.Add( ScrollMode::X_AXIS_SNAP_TO_INTERVAL, viewPageSize.width );
+ rulerMap.Add( ScrollMode::X_AXIS_SCROLL_BOUNDARY, viewPageSize.width*3 );
rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, false );
scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap);
rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, false );
scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap);
Vector2 currentPos( PerformGestureSwipe( application, startPos, direction, frames - 1, time, false ) );
// Confirm the final X coord has not moved more than one page from the start X position.
Vector2 currentPos( PerformGestureSwipe( application, startPos, direction, frames - 1, time, false ) );
// Confirm the final X coord has not moved more than one page from the start X position.
- DALI_TEST_GREATER( ( startPos.x + pageSize.width ), scrollView.GetCurrentScrollPosition().x, TEST_LOCATION );
+ DALI_TEST_GREATER( ( startPos.x + viewPageSize.width ), scrollView.GetCurrentScrollPosition().x, TEST_LOCATION );
time += Wait( application, RENDER_DELAY_SCROLL + RENDER_FRAME_INTERVAL );
// Confirm the final X coord has snapped to exactly one page ahead of the start page.
time += Wait( application, RENDER_DELAY_SCROLL + RENDER_FRAME_INTERVAL );
// Confirm the final X coord has snapped to exactly one page ahead of the start page.
- DALI_TEST_EQUALS( pageSize.width, scrollView.GetCurrentScrollPosition().x, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( viewPageSize.width, scrollView.GetCurrentScrollPosition().x, Math::MACHINE_EPSILON_0, TEST_LOCATION );
scrollView.SetParentOrigin( ParentOrigin::CENTER );
scrollView.SetAnchorPoint( AnchorPoint::CENTER );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
scrollView.SetParentOrigin( ParentOrigin::CENTER );
scrollView.SetAnchorPoint( AnchorPoint::CENTER );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
Property::Map rulerMap;
rulerMap.Add( ScrollMode::X_AXIS_SCROLL_ENABLED, false );
rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, true );
Property::Map rulerMap;
rulerMap.Add( ScrollMode::X_AXIS_SCROLL_ENABLED, false );
rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, true );
- rulerMap.Add( ScrollMode::Y_AXIS_SNAP_TO_INTERVAL, pageSize.height );
- rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_BOUNDARY, pageSize.height*3 );
+ rulerMap.Add( ScrollMode::Y_AXIS_SNAP_TO_INTERVAL, viewPageSize.height );
+ rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_BOUNDARY, viewPageSize.height*3 );
scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap);
scrollView.SetWrapMode( false );
scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap);
scrollView.SetWrapMode( false );
Vector2 currentPos( PerformGestureSwipe( application, startPos, direction, frames - 1, time, false ) );
// Confirm the final X coord has not moved more than one page from the start X position.
Vector2 currentPos( PerformGestureSwipe( application, startPos, direction, frames - 1, time, false ) );
// Confirm the final X coord has not moved more than one page from the start X position.
- DALI_TEST_GREATER( ( startPos.y + pageSize.height ), scrollView.GetCurrentScrollPosition().y, TEST_LOCATION );
+ DALI_TEST_GREATER( ( startPos.y + viewPageSize.height ), scrollView.GetCurrentScrollPosition().y, TEST_LOCATION );
Wait( application, RENDER_DELAY_SCROLL + RENDER_FRAME_INTERVAL );
// Confirm the final Y coord has snapped to exactly one page ahead of the start page.
Wait( application, RENDER_DELAY_SCROLL + RENDER_FRAME_INTERVAL );
// Confirm the final Y coord has snapped to exactly one page ahead of the start page.
- DALI_TEST_EQUALS( pageSize.height, scrollView.GetCurrentScrollPosition().y, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( viewPageSize.height, scrollView.GetCurrentScrollPosition().y, Math::MACHINE_EPSILON_0, TEST_LOCATION );
scrollView.SetParentOrigin( ParentOrigin::CENTER );
scrollView.SetAnchorPoint( AnchorPoint::CENTER );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
scrollView.SetParentOrigin( ParentOrigin::CENTER );
scrollView.SetAnchorPoint( AnchorPoint::CENTER );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
Property::Map rulerMap;
rulerMap.Add( ScrollMode::X_AXIS_SCROLL_ENABLED, false );
rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, true );
Property::Map rulerMap;
rulerMap.Add( ScrollMode::X_AXIS_SCROLL_ENABLED, false );
rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_ENABLED, true );
- rulerMap.Add( ScrollMode::Y_AXIS_SNAP_TO_INTERVAL, pageSize.height );
- rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_BOUNDARY, pageSize.height*3 );
+ rulerMap.Add( ScrollMode::Y_AXIS_SNAP_TO_INTERVAL, viewPageSize.height );
+ rulerMap.Add( ScrollMode::Y_AXIS_SCROLL_BOUNDARY, viewPageSize.height*3 );
scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap);
scrollView.SetWrapMode( false );
scrollView.SetProperty( ScrollView::Property::SCROLL_MODE, rulerMap);
scrollView.SetWrapMode( false );
Vector2 currentPos( PerformGestureSwipe( application, startPos, direction, frames - 1, time, false ) );
// Confirm the final X coord has not moved more than one page from the start X position.
Vector2 currentPos( PerformGestureSwipe( application, startPos, direction, frames - 1, time, false ) );
// Confirm the final X coord has not moved more than one page from the start X position.
- DALI_TEST_GREATER( ( startPos.y + pageSize.height ), scrollView.GetCurrentScrollPosition().y, TEST_LOCATION );
+ DALI_TEST_GREATER( ( startPos.y + viewPageSize.height ), scrollView.GetCurrentScrollPosition().y, TEST_LOCATION );
Wait( application, RENDER_DELAY_SCROLL + RENDER_FRAME_INTERVAL );
// Confirm the final Y coord has snapped to exactly one page ahead of the start page.
Wait( application, RENDER_DELAY_SCROLL + RENDER_FRAME_INTERVAL );
// Confirm the final Y coord has snapped to exactly one page ahead of the start page.
- DALI_TEST_EQUALS( pageSize.height, scrollView.GetCurrentScrollPosition().y, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( viewPageSize.height, scrollView.GetCurrentScrollPosition().y, Math::MACHINE_EPSILON_0, TEST_LOCATION );
scrollView.SetParentOrigin( ParentOrigin::TOP_LEFT );
scrollView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
scrollView.SetParentOrigin( ParentOrigin::TOP_LEFT );
scrollView.SetAnchorPoint( AnchorPoint::TOP_LEFT );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
scrollView.SetParentOrigin( ParentOrigin::CENTER );
scrollView.SetAnchorPoint( AnchorPoint::CENTER );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
// Position rulers.
// We set the X ruler to fixed to give us pages to snap to.
scrollView.SetParentOrigin( ParentOrigin::CENTER );
scrollView.SetAnchorPoint( AnchorPoint::CENTER );
scrollView.SetPosition( 0.0f, 0.0f, 0.0f );
// Position rulers.
// We set the X ruler to fixed to give us pages to snap to.
// Note: The 3x page width is arbitary, but we need enough to show that we are
// capping page movement by the page limiter, and not the domain.
// Note: The 3x page width is arbitary, but we need enough to show that we are
// capping page movement by the page limiter, and not the domain.
Vector2 currentPos( PerformGestureSwipe( application, startPos, direction, frames - 1, time, false ) );
// Confirm the final X coord has not moved more than one page from the start X position.
Vector2 currentPos( PerformGestureSwipe( application, startPos, direction, frames - 1, time, false ) );
// Confirm the final X coord has not moved more than one page from the start X position.
- DALI_TEST_GREATER( ( startPos.x + pageSize.width ), scrollView.GetCurrentScrollPosition().x, TEST_LOCATION );
+ DALI_TEST_GREATER( ( startPos.x + viewPageSize.width ), scrollView.GetCurrentScrollPosition().x, TEST_LOCATION );
time += Wait( application, RENDER_DELAY_SCROLL + RENDER_FRAME_INTERVAL );
// Confirm the final X coord has snapped to exactly one page ahead of the start page.
time += Wait( application, RENDER_DELAY_SCROLL + RENDER_FRAME_INTERVAL );
// Confirm the final X coord has snapped to exactly one page ahead of the start page.
- DALI_TEST_EQUALS( pageSize.width, scrollView.GetCurrentScrollPosition().x, Math::MACHINE_EPSILON_0, TEST_LOCATION );
+ DALI_TEST_EQUALS( viewPageSize.width, scrollView.GetCurrentScrollPosition().x, Math::MACHINE_EPSILON_0, TEST_LOCATION );