*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// INTERNAL INCLUDES
#include <dali-toolkit/internal/controls/scrollable/scrollable-impl.h>
#include <dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/controls/scrollable/scrollable-impl.h>
#include <dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.h>
const float OVERSHOOT_BOUNCE_ACTOR_RESIZE_THRESHOLD = 180.0f;
// local helper function to resize the height of the bounce actor
const float OVERSHOOT_BOUNCE_ACTOR_RESIZE_THRESHOLD = 180.0f;
// local helper function to resize the height of the bounce actor
mOvershootProperty(Property::INVALID_INDEX),
mEffectOvershootProperty(Property::INVALID_INDEX),
mOvershoot(0.0f),
mOvershootProperty(Property::INVALID_INDEX),
mEffectOvershootProperty(Property::INVALID_INDEX),
mOvershoot(0.0f),
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
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(parentSize.width, GetBounceActorHeight(parentSize.width), size.depth);
+ mOvershootOverlay.SetSize(parentSize.width, GetBounceActorHeight(parentSize.width, mOvershootSize.height), size.depth);
- 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);
relativeOffset = Vector3(0.0f, 1.0f, 0.0f);
}
mOvershootOverlay.SetPosition(relativeOffset * parentSize);
- 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 ) );
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);
relativeOffset = Vector3(1.0f, 0.0f, 0.0f);
}
mOvershootOverlay.SetPosition(relativeOffset * parentSize);
void ScrollOvershootEffectRipple::OnOvershootNotification(PropertyNotification& source)
{
Actor self = mAttachedScrollView.Self();
void ScrollOvershootEffectRipple::OnOvershootNotification(PropertyNotification& source)
{
Actor self = mAttachedScrollView.Self();
SetOvershoot(mOvershoot, false);
UpdatePropertyNotifications();
}
SetOvershoot(mOvershoot, false);
UpdatePropertyNotifications();
}