From: Jonghyun Ho Date: Tue, 22 Sep 2015 04:40:54 +0000 (+0900) Subject: Update scroll end effect GUI X-Git-Tag: dali_1.1.7~20 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=7cb4bfa33768acfc53444871387eef07b72b2066 Update scroll end effect GUI Change-Id: I8d11ff97bed46ffc3c8fa2bada37adeffe9f6c5e --- diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp index b85524d..2c49895 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp @@ -704,11 +704,11 @@ int UtcDaliItemViewReplaceItemsP(void) for( unsigned int i = 0u; i < 10; ++i ) { - Actor child = view.GetChildAt( i ); + Actor child = view.GetItem( i ); Actor newActor = Actor::New(); newActor.SetName("Replaced"); - replaceList.push_back( Item( view.GetItemId(child), newActor ) ); + replaceList.push_back( Item( i, newActor ) ); } if( !replaceList.empty() ) diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp index cf3e163..dd631c6 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp @@ -882,6 +882,7 @@ int UtcDaliToolkitScrollViewScrollSensitive(void) // Set up a scrollView... ScrollView scrollView = ScrollView::New(); + scrollView.SetOvershootEnabled(true); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); scrollView.SetSize(stageSize); @@ -1093,6 +1094,7 @@ int UtcDaliToolkitScrollViewOvershoot(void) // Set up a scrollView... ScrollView scrollView = ScrollView::New(); + scrollView.SetOvershootEnabled(true); Stage::GetCurrent().Add( scrollView ); Vector2 stageSize = Stage::GetCurrent().GetSize(); scrollView.SetSize(stageSize); diff --git a/dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.cpp b/dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.cpp index 89eb96e..9969f77 100644 --- a/dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.cpp +++ b/dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.cpp @@ -39,7 +39,14 @@ namespace Internal namespace { // Bouncing effect is presented by stacked three layers with same color and opacity -const Vector3 LAYER_HEIGHTS( 1.f, 27.f/42.f, 13.f/42.f); +const float LAYER_HEIGHTS[5] = +{ + 1.f, + 26.f * 4.f/ 130.f, + 26.f * 3.f / 130.f, + 26.f * 2.f / 130.f, + 26.f / 130.f +}; #define MAKE_SHADER(A)#A @@ -77,33 +84,43 @@ Actor CreateBouncingEffectActor( Property::Index& bouncePropertyIndex ) Vector3 position2; }; // 4 vertices 2 triangles per layer. The depth interval between each layer is 0.01 - VertexPosition vertexData[12] = { - //bottom layer + VertexPosition vertexData[20] = { + // bottom layer { Vector3( -0.5f, -0.5f, 0.f ), Vector3( -0.5f, -0.5f, 0.f ) }, { Vector3( 0.5f, -0.5f, 0.f ), Vector3( 0.5f, -0.5f, 0.f ) }, { Vector3( -0.5f, -0.5f, 0.f ), Vector3( -0.5f, -0.5f + LAYER_HEIGHTS[0], 0.f ) }, { Vector3( 0.5f, -0.5f, 0.f ), Vector3( 0.5f, -0.5f+ LAYER_HEIGHTS[0], 0.f ) }, - // middle layer + // mid-bottom layer { Vector3( -0.5f, -0.5f, 0.01f ), Vector3( -0.5f, -0.5f, 0.01f ) }, { Vector3( 0.5f, -0.5f, 0.01f ), Vector3( 0.5f, -0.5f, 0.01f ) }, { Vector3( -0.5f, -0.5f, 0.01f ), Vector3( -0.5f, -0.5f + LAYER_HEIGHTS[1], 0.01f ) }, { Vector3( 0.5f, -0.5f, 0.01f ), Vector3( 0.5f, -0.5f+ LAYER_HEIGHTS[1], 0.01f ) }, - // top layer + // middle layer { Vector3( -0.5f, -0.5f, 0.02f ), Vector3( -0.5f, -0.5f, 0.02f ) }, { Vector3( 0.5f, -0.5f, 0.02f ), Vector3( 0.5f, -0.5f, 0.02f ) }, { Vector3( -0.5f, -0.5f, 0.02f ), Vector3( -0.5f, -0.5f + LAYER_HEIGHTS[2], 0.02f ) }, - { Vector3( 0.5f, -0.5f, 0.02f ), Vector3( 0.5f, -0.5f+ LAYER_HEIGHTS[2], 0.02f ) } + { Vector3( 0.5f, -0.5f, 0.02f ), Vector3( 0.5f, -0.5f+ LAYER_HEIGHTS[2], 0.02f ) }, + // mid-top layer + { Vector3( -0.5f, -0.5f, 0.03f ), Vector3( -0.5f, -0.5f, 0.03f ) }, + { Vector3( 0.5f, -0.5f, 0.03f ), Vector3( 0.5f, -0.5f, 0.03f ) }, + { Vector3( -0.5f, -0.5f, 0.03f ), Vector3( -0.5f, -0.5f + LAYER_HEIGHTS[3], 0.03f ) }, + { Vector3( 0.5f, -0.5f, 0.03f ), Vector3( 0.5f, -0.5f+ LAYER_HEIGHTS[3], 0.03f ) }, + // top layer + { Vector3( -0.5f, -0.5f, 0.04f ), Vector3( -0.5f, -0.5f, 0.04f ) }, + { Vector3( 0.5f, -0.5f, 0.04f ), Vector3( 0.5f, -0.5f, 0.04f ) }, + { Vector3( -0.5f, -0.5f, 0.04f ), Vector3( -0.5f, -0.5f + LAYER_HEIGHTS[4], 0.04f ) }, + { Vector3( 0.5f, -0.5f, 0.04f ), Vector3( 0.5f, -0.5f+ LAYER_HEIGHTS[4], 0.04f ) } }; Property::Map vertexFormat; vertexFormat["aPosition1"] = Property::VECTOR3; vertexFormat["aPosition2"] = Property::VECTOR3; - PropertyBuffer vertices = PropertyBuffer::New( vertexFormat, 12u ); + PropertyBuffer vertices = PropertyBuffer::New( vertexFormat, 20u ); vertices.SetData( vertexData ); - unsigned int indexData[18] = { 0,3,1,0,2,3,4,7,5,4,6,7,8,11,9,8,10,11 }; + unsigned int indexData[30] = { 0,3,1,0,2,3,4,7,5,4,6,7,8,11,9,8,10,11,12,15,13,12,14,15,16,19,17,16,18,19}; Property::Map indexFormat; indexFormat["indices"] = Property::INTEGER; - PropertyBuffer indices = PropertyBuffer::New( indexFormat, 18u ); + PropertyBuffer indices = PropertyBuffer::New( indexFormat, 30u ); indices.SetData( indexData ); Geometry meshGeometry = Geometry::New(); diff --git a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp index 9cb8aff..91a9f97 100644 --- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp @@ -71,7 +71,6 @@ const float DEFAULT_ANCHORING_DURATION = 1.0f; // 1 second const float MILLISECONDS_PER_SECONDS = 1000.0f; -const Vector2 OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE( 720.0f, 42.0f ); const float OVERSHOOT_BOUNCE_ACTOR_RESIZE_THRESHOLD = 180.0f; const Vector4 OVERSHOOT_OVERLAY_NINE_PATCH_BORDER(0.0f, 0.0f, 1.0f, 12.0f); const float DEFAULT_KEYBOARD_FOCUS_SCROLL_DURATION = 0.2f; @@ -90,23 +89,33 @@ float CalculateScrollDistance(Vector2 panDistance, Toolkit::ItemLayout& layout) } // Overshoot overlay constraints -void OvershootOverlaySizeConstraint( Vector3& current, const PropertyInputContainer& inputs ) +struct OvershootOverlaySizeConstraint { - const Vector2& parentScrollDirection = inputs[0]->GetVector2(); - const Toolkit::ControlOrientation::Type& layoutOrientation = static_cast(inputs[1]->GetInteger()); - const Vector3& parentSize = inputs[2]->GetVector3(); - - if(Toolkit::IsVertical(layoutOrientation)) + OvershootOverlaySizeConstraint( float height ) + : mOvershootHeight( height ) { - current.width = fabsf(parentScrollDirection.y) > Math::MACHINE_EPSILON_1 ? parentSize.x : parentSize.y; } - else + + void operator()( Vector3& current, const PropertyInputContainer& inputs ) { - current.width = fabsf(parentScrollDirection.x) > Math::MACHINE_EPSILON_1 ? parentSize.y : parentSize.x; + const Vector2& parentScrollDirection = inputs[0]->GetVector2(); + const Toolkit::ControlOrientation::Type& layoutOrientation = static_cast(inputs[1]->GetInteger()); + const Vector3& parentSize = inputs[2]->GetVector3(); + + if(Toolkit::IsVertical(layoutOrientation)) + { + current.width = fabsf(parentScrollDirection.y) > Math::MACHINE_EPSILON_1 ? parentSize.x : parentSize.y; + } + else + { + current.width = fabsf(parentScrollDirection.x) > Math::MACHINE_EPSILON_1 ? parentSize.y : parentSize.x; + } + + current.height = ( current.width > OVERSHOOT_BOUNCE_ACTOR_RESIZE_THRESHOLD ) ? mOvershootHeight : mOvershootHeight*0.5f; } - current.height = ( current.width > OVERSHOOT_BOUNCE_ACTOR_RESIZE_THRESHOLD ) ? OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.height : OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.height*0.5f; -} + float mOvershootHeight; +}; void OvershootOverlayRotationConstraint( Quaternion& current, const PropertyInputContainer& inputs ) { @@ -307,8 +316,6 @@ void ItemView::OnInitialize() { Actor self = Self(); - SetOvershootEnabled(true); - Vector2 stageSize = Stage::GetCurrent().GetSize(); mWheelScrollDistanceStep = stageSize.y * DEFAULT_WHEEL_SCROLL_DISTANCE_STEP_PROPORTION; @@ -1483,13 +1490,13 @@ void ItemView::EnableScrollOvershoot( bool enable ) mOvershootOverlay.SetDrawMode( DrawMode::OVERLAY_2D ); self.Add(mOvershootOverlay); - Constraint constraint = Constraint::New( mOvershootOverlay, Actor::Property::SIZE, OvershootOverlaySizeConstraint ); + Constraint constraint = Constraint::New( mOvershootOverlay, Actor::Property::SIZE, OvershootOverlaySizeConstraint(mOvershootSize.height) ); constraint.AddSource( ParentSource( Toolkit::ItemView::Property::SCROLL_DIRECTION ) ); constraint.AddSource( ParentSource( Toolkit::ItemView::Property::LAYOUT_ORIENTATION ) ); constraint.AddSource( ParentSource( Actor::Property::SIZE ) ); constraint.Apply(); - mOvershootOverlay.SetSize(OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.width, OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.height); + mOvershootOverlay.SetSize(mOvershootSize.width, mOvershootSize.height); constraint = Constraint::New( mOvershootOverlay, Actor::Property::ORIENTATION, OvershootOverlayRotationConstraint ); constraint.AddSource( ParentSource( Toolkit::ItemView::Property::SCROLL_DIRECTION ) ); diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp index 0420830..bfc49c0 100644 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp @@ -27,13 +27,13 @@ using namespace Dali; namespace { -const Vector2 OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE( 720.0f, 42.0f ); + const float OVERSHOOT_BOUNCE_ACTOR_RESIZE_THRESHOLD = 180.0f; // local helper function to resize the height of the bounce actor -float GetBounceActorHeight( float width ) +float GetBounceActorHeight( float width, float defaultHeight ) { - return (width > OVERSHOOT_BOUNCE_ACTOR_RESIZE_THRESHOLD) ? OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.height : OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.height * 0.5f; + return (width > OVERSHOOT_BOUNCE_ACTOR_RESIZE_THRESHOLD) ? defaultHeight : defaultHeight * 0.5f; } const float MAX_OVERSHOOT_NOTIFY_AMOUNT = 0.99f; // maximum amount to set notification for increased overshoot, beyond this we just wait for it to reduce again @@ -129,6 +129,7 @@ ScrollOvershootEffectRipple::ScrollOvershootEffectRipple( bool vertical, Scrolla mOvershootProperty(Property::INVALID_INDEX), mEffectOvershootProperty(Property::INVALID_INDEX), mOvershoot(0.0f), + mOvershootSize( scrollable.GetOvershootSize() ), mAnimationStateFlags(0) { mOvershootOverlay = CreateBouncingEffectActor(mEffectOvershootProperty); @@ -145,7 +146,7 @@ void ScrollOvershootEffectRipple::Apply() mOvershootProperty = IsVertical() ? Toolkit::ScrollView::Property::OVERSHOOT_Y : Toolkit::ScrollView::Property::OVERSHOOT_X; // make sure height is set, since we only create a constraint for image width - mOvershootOverlay.SetSize(OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.width, OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.height); + mOvershootOverlay.SetSize( mOvershootSize ); mAttachedScrollView.AddOverlay(mOvershootOverlay); @@ -242,12 +243,12 @@ void ScrollOvershootEffectRipple::UpdateVisibility( bool visible ) if(IsVertical()) { mOvershootOverlay.SetOrientation( Quaternion( Radian( 0.0f ), Vector3::ZAXIS ) ); - mOvershootOverlay.SetSize(parentSize.width, GetBounceActorHeight(parentSize.width), size.depth); + mOvershootOverlay.SetSize(parentSize.width, GetBounceActorHeight(parentSize.width, mOvershootSize.height), size.depth); } else { mOvershootOverlay.SetOrientation( Quaternion( Radian( 1.5f * Math::PI ), Vector3::ZAXIS ) ); - mOvershootOverlay.SetSize(parentSize.height, GetBounceActorHeight(parentSize.height), size.depth); + mOvershootOverlay.SetSize(parentSize.height, GetBounceActorHeight(parentSize.height, mOvershootSize.height), size.depth); relativeOffset = Vector3(0.0f, 1.0f, 0.0f); } mOvershootOverlay.SetPosition(relativeOffset * parentSize); @@ -261,13 +262,13 @@ void ScrollOvershootEffectRipple::UpdateVisibility( bool visible ) if(IsVertical()) { mOvershootOverlay.SetOrientation( Quaternion( Radian( Math::PI ), Vector3::ZAXIS ) ); - mOvershootOverlay.SetSize(parentSize.width, GetBounceActorHeight(parentSize.width), size.depth); + mOvershootOverlay.SetSize(parentSize.width, GetBounceActorHeight(parentSize.width, mOvershootSize.height), size.depth); relativeOffset = Vector3(1.0f, 1.0f, 0.0f); } else { mOvershootOverlay.SetOrientation( Quaternion( Radian( 0.5f * Math::PI ), Vector3::ZAXIS ) ); - mOvershootOverlay.SetSize(parentSize.height, GetBounceActorHeight(parentSize.height), size.depth); + mOvershootOverlay.SetSize(parentSize.height, GetBounceActorHeight(parentSize.height, mOvershootSize.height), size.depth); relativeOffset = Vector3(1.0f, 0.0f, 0.0f); } mOvershootOverlay.SetPosition(relativeOffset * parentSize); diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.h b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.h index 7eebe4b..1dadcfc 100644 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.h +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.h @@ -251,8 +251,9 @@ private: PropertyNotification mOvershootDecreaseNotification;///< notification used to inform as overshoot decreases Property::Index mOvershootProperty; ///< index of the overshoot property in the scrollable actor Property::Index mEffectOvershootProperty; ///< index of the effect's overshoot property - float mOvershoot; ///< last overshoot value as detected by notifications - unsigned short mAnimationStateFlags; ///< contains flags indicating the current state of the overshoot animation + float mOvershoot; ///< last overshoot value as detected by notifications + Vector2 mOvershootSize; ///< The size of the overshoot effect + unsigned short mAnimationStateFlags; ///< contains flags indicating the current state of the overshoot animation }; } // namespace Internal diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp index a8bd61e..4681474 100644 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp @@ -648,8 +648,6 @@ void ScrollView::OnInitialize() mRulerX = ruler; mRulerY = ruler; - SetOvershootEnabled(true); - self.SetProperty(Toolkit::Scrollable::Property::CAN_SCROLL_VERTICAL, mCanScrollVertical); self.SetProperty(Toolkit::Scrollable::Property::CAN_SCROLL_HORIZONTAL, mCanScrollHorizontal); @@ -1698,19 +1696,25 @@ bool ScrollView::AnimateTo(const Vector2& position, const Vector2& positionDurat void ScrollView::EnableScrollOvershoot(bool enable) { - if(enable && !mOvershootIndicator) - { - mOvershootIndicator = ScrollOvershootIndicator::New(); - } - if( enable ) + if (enable) { + if (!mOvershootIndicator) + { + mOvershootIndicator = ScrollOvershootIndicator::New(); + } + mOvershootIndicator->AttachToScrollable(*this); } else { mMaxOvershoot = mUserMaxOvershoot; - mOvershootIndicator->DetachFromScrollable(*this); + + if (mOvershootIndicator) + { + mOvershootIndicator->DetachFromScrollable(*this); + } } + UpdateMainInternalConstraint(); } diff --git a/dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp b/dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp index b3a2152..79b463f 100644 --- a/dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp @@ -48,6 +48,8 @@ DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Scrollable, Toolkit::Control, Create ); DALI_PROPERTY_REGISTRATION( Toolkit, Scrollable, "overshoot-effect-color", VECTOR4, OVERSHOOT_EFFECT_COLOR ) DALI_PROPERTY_REGISTRATION( Toolkit, Scrollable, "overshoot-animation-speed", FLOAT, OVERSHOOT_ANIMATION_SPEED ) +const int OVERSHOOT_SIZE = Dali::Toolkit::Scrollable::Property::OVERSHOOT_ANIMATION_SPEED + 1; // OVERSHOOT_SIZE is not public yet +Dali::PropertyRegistration p1( typeRegistration, "overshoot-size", OVERSHOOT_SIZE, Property::VECTOR2, Dali::Toolkit::Internal::Scrollable::SetProperty, Dali::Toolkit::Internal::Scrollable::GetProperty ); DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, Scrollable, "scroll-relative-position", VECTOR2, SCROLL_RELATIVE_POSITION) DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, Scrollable, "scroll-position-min", VECTOR2, SCROLL_POSITION_MIN) @@ -67,6 +69,7 @@ DALI_TYPE_REGISTRATION_END() const Vector4 DEFAULT_OVERSHOOT_COLOUR(0.0f, 0.64f, 0.85f, 0.25f); const float DEFAULT_OVERSHOOT_ANIMATION_SPEED(120.0f); // 120 pixels per second +const Vector2 OVERSHOOT_DEFAULT_SIZE( 720.0f, 42.0f ); } @@ -80,7 +83,8 @@ Scrollable::Scrollable() : Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS | DISABLE_SIZE_NEGOTIATION ) ), mOvershootEffectColor( DEFAULT_OVERSHOOT_COLOUR ), mOvershootAnimationSpeed ( DEFAULT_OVERSHOOT_ANIMATION_SPEED ), - mOvershootEnabled(false) + mOvershootSize( OVERSHOOT_DEFAULT_SIZE ), + mOvershootEnabled(true) { } @@ -88,7 +92,8 @@ Scrollable::Scrollable( ControlBehaviour behaviourFlags ) : Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS | behaviourFlags ) ), mOvershootEffectColor( DEFAULT_OVERSHOOT_COLOUR ), mOvershootAnimationSpeed ( DEFAULT_OVERSHOOT_ANIMATION_SPEED ), - mOvershootEnabled(false) + mOvershootSize( OVERSHOOT_DEFAULT_SIZE ), + mOvershootEnabled(true) { } @@ -122,6 +127,11 @@ float Scrollable::GetOvershootAnimationSpeed() const return mOvershootAnimationSpeed; }; +const Vector2& Scrollable::GetOvershootSize() const +{ + return mOvershootSize; +} + Toolkit::Scrollable::ScrollStartedSignalType& Scrollable::ScrollStartedSignal() { return mScrollStartedSignal; @@ -184,6 +194,16 @@ void Scrollable::SetProperty( BaseObject* object, Property::Index index, const P scrollableImpl.SetOvershootAnimationSpeed( value.Get() ); break; } + case OVERSHOOT_SIZE: // OVERSHOOT_SIZE is not public yet + { + Vector2 input; + if( value.Get( input ) ) + { + scrollableImpl.mOvershootSize = input; + } + scrollableImpl.EnableScrollOvershoot( scrollableImpl.IsOvershootEnabled() ); + break; + } } } } @@ -209,6 +229,11 @@ Property::Value Scrollable::GetProperty( BaseObject* object, Property::Index ind value = scrollableImpl.GetOvershootAnimationSpeed(); break; } + case OVERSHOOT_SIZE: // OVERSHOOT_SIZE is not public yet + { + value = scrollableImpl.mOvershootSize; + break; + } } } diff --git a/dali-toolkit/internal/controls/scrollable/scrollable-impl.h b/dali-toolkit/internal/controls/scrollable/scrollable-impl.h index 0b349f5..97b3107 100644 --- a/dali-toolkit/internal/controls/scrollable/scrollable-impl.h +++ b/dali-toolkit/internal/controls/scrollable/scrollable-impl.h @@ -110,6 +110,11 @@ public: */ float GetOvershootAnimationSpeed() const; + /** + * @copydoc Dali::Toolkit::Scrollable::GetOvershootSize() + */ + const Vector2& GetOvershootSize() const; + private: /** @@ -205,6 +210,7 @@ protected: Vector4 mOvershootEffectColor; ///