From 19d63b94cc7e594048cbdd63518fe350940ae79a Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 30 Apr 2015 17:43:47 +0100 Subject: [PATCH] Fixes for latest merge and temporarily removed V8 support Change-Id: I8769aa8eea9eeef236ab451235bcc2502b7997bc --- build/tizen/configure.ac | 2 +- .../scrollable/item-view/item-view-impl.cpp | 7 +- .../scroll-overshoot-indicator-impl.cpp | 74 ++++------------------ 3 files changed, 19 insertions(+), 64 deletions(-) diff --git a/build/tizen/configure.ac b/build/tizen/configure.ac index 006e192..6f8e877 100644 --- a/build/tizen/configure.ac +++ b/build/tizen/configure.ac @@ -56,7 +56,7 @@ AC_ARG_ENABLE([javascript], [AC_HELP_STRING([--enable-javascript], [Enable JavaScript plugin])] , [enable_javascript=$enableval], - [enable_javascript=automatic]) + [enable_javascript=no]) if test "x$enable_debug" = "xyes"; then 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 a9f342c..d122e38 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 @@ -1506,6 +1506,7 @@ void ItemView::SetOvershootEffectColor( const Vector4& color ) void ItemView::SetOvershootEnabled( bool enable ) { +/** Actor self = Self(); if( enable ) { @@ -1516,7 +1517,6 @@ void ItemView::SetOvershootEnabled( bool enable ) mOvershootOverlay.SetAnchorPoint(AnchorPoint::TOP_LEFT); mOvershootOverlay.SetDrawMode(DrawMode::OVERLAY); self.Add(mOvershootOverlay); - Constraint constraint = Constraint::New( mOvershootOverlay, Actor::Property::SIZE, OvershootOverlaySizeConstraint ); constraint.AddSource( ParentSource( Toolkit::Scrollable::Property::SCROLL_DIRECTION ) ); constraint.AddSource( ParentSource( Actor::Property::SIZE ) ); @@ -1551,6 +1551,7 @@ void ItemView::SetOvershootEnabled( bool enable ) mOvershootOverlay.Reset(); } } +*/ } float ItemView::CalculateScrollOvershoot() @@ -1588,13 +1589,15 @@ void ItemView::AnimateScrollOvershoot(float overshootAmount, bool animateBack) if(mOvershootAnimationSpeed > Math::MACHINE_EPSILON_0) { - float currentOvershoot = mScrollPositionObject.GetProperty(ScrollConnector::OVERSHOOT); + //float currentOvershoot = mScrollPositionObject.GetProperty(ScrollConnector::OVERSHOOT); float duration = 0.0f; + /** if (mOvershootOverlay) { duration = mOvershootOverlay.GetCurrentSize().height * (animatingOn ? (1.0f - fabsf(currentOvershoot)) : fabsf(currentOvershoot)) / mOvershootAnimationSpeed; } + */ RemoveAnimation(mScrollOvershootAnimation); mScrollOvershootAnimation = Animation::New(duration); 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 0d2e728..344a761 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 @@ -143,13 +143,14 @@ ScrollOvershootEffectRipple::ScrollOvershootEffectRipple( bool vertical, Scrolla mOvershoot(0.0f), mAnimationStateFlags(0) { + /* mOvershootOverlay = CreateBouncingEffectActor(mEffectOvershootProperty); mOvershootOverlay.SetColor(mAttachedScrollView.GetOvershootEffectColor()); mOvershootOverlay.SetParentOrigin(ParentOrigin::TOP_LEFT); mOvershootOverlay.SetAnchorPoint(AnchorPoint::TOP_LEFT); mOvershootOverlay.SetDrawMode(DrawMode::OVERLAY); mOvershootOverlay.SetVisible(false); - + */ } void ScrollOvershootEffectRipple::Apply() @@ -158,16 +159,16 @@ 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(OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.width, OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.height); - mAttachedScrollView.AddOverlay(mOvershootOverlay); + //mAttachedScrollView.AddOverlay(mOvershootOverlay); UpdatePropertyNotifications(); } void ScrollOvershootEffectRipple::Remove( Scrollable& scrollable ) { - if(mOvershootOverlay) +// if(mOvershootOverlay) { if(mOvershootIncreaseNotification) { @@ -179,14 +180,14 @@ void ScrollOvershootEffectRipple::Remove( Scrollable& scrollable ) scrollable.Self().RemovePropertyNotification(mOvershootDecreaseNotification); mOvershootDecreaseNotification.Reset(); } - scrollable.RemoveOverlay(mOvershootOverlay); + //scrollable.RemoveOverlay(mOvershootOverlay); } } void ScrollOvershootEffectRipple::Reset() { - mOvershootOverlay.SetVisible(false); - mOvershootOverlay.SetProperty( mEffectOvershootProperty, 0.f); +// mOvershootOverlay.SetVisible(false); +// mOvershootOverlay.SetProperty( mEffectOvershootProperty, 0.f); } void ScrollOvershootEffectRipple::UpdatePropertyNotifications() @@ -233,59 +234,10 @@ void ScrollOvershootEffectRipple::UpdatePropertyNotifications() void ScrollOvershootEffectRipple::SetOvershootEffectColor( const Vector4& color ) { - if(mOvershootOverlay) - { - mOvershootOverlay.SetColor(color); - } } void ScrollOvershootEffectRipple::UpdateVisibility( bool visible ) { - mOvershootOverlay.SetVisible(visible); - // make sure overshoot image is correctly placed - if( visible ) - { - Actor self = mAttachedScrollView.Self(); - if(mOvershoot > 0.0f) - { - // positive overshoot - const Vector3 size = mOvershootOverlay.GetCurrentSize(); - Vector3 relativeOffset; - const Vector3 parentSize = self.GetCurrentSize(); - if(IsVertical()) - { - mOvershootOverlay.SetOrientation( Quaternion( Radian( 0.0f ), Vector3::ZAXIS ) ); - mOvershootOverlay.SetSize(parentSize.width, GetBounceActorHeight(parentSize.width), size.depth); - } - else - { - mOvershootOverlay.SetOrientation( Quaternion( Radian( 1.5f * Math::PI ), Vector3::ZAXIS ) ); - mOvershootOverlay.SetSize(parentSize.height, GetBounceActorHeight(parentSize.height), size.depth); - relativeOffset = Vector3(0.0f, 1.0f, 0.0f); - } - mOvershootOverlay.SetPosition(relativeOffset * parentSize); - } - else - { - // negative overshoot - const Vector3 size = mOvershootOverlay.GetCurrentSize(); - Vector3 relativeOffset; - const Vector3 parentSize = self.GetCurrentSize(); - if(IsVertical()) - { - mOvershootOverlay.SetOrientation( Quaternion( Radian( Math::PI ), Vector3::ZAXIS ) ); - mOvershootOverlay.SetSize(parentSize.width, GetBounceActorHeight(parentSize.width), 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); - relativeOffset = Vector3(1.0f, 0.0f, 0.0f); - } - mOvershootOverlay.SetPosition(relativeOffset * parentSize); - } - } } void ScrollOvershootEffectRipple::OnOvershootNotification(PropertyNotification& source) @@ -330,8 +282,8 @@ void ScrollOvershootEffectRipple::SetOvershoot(float amount, bool animate) if( animate && overshootAnimationSpeed > Math::MACHINE_EPSILON_0 ) { - float currentOvershoot = fabsf( mOvershootOverlay.GetProperty( mEffectOvershootProperty ).Get() ); - float duration = mOvershootOverlay.GetCurrentSize().height * (animatingOn ? (1.0f - currentOvershoot) : currentOvershoot) / overshootAnimationSpeed; + //float currentOvershoot = 0.0f;//fabsf( mOvershootOverlay.GetProperty( mEffectOvershootProperty ).Get() ); + float duration = 0.05f;//mOvershootOverlay.GetCurrentSize().height * (animatingOn ? (1.0f - currentOvershoot) : currentOvershoot) / overshootAnimationSpeed; if( duration > Math::MACHINE_EPSILON_0 ) { @@ -343,14 +295,14 @@ void ScrollOvershootEffectRipple::SetOvershoot(float amount, bool animate) } mScrollOvershootAnimation = Animation::New(duration); mScrollOvershootAnimation.FinishedSignal().Connect( this, &ScrollOvershootEffectRipple::OnOvershootAnimFinished ); - mScrollOvershootAnimation.AnimateTo( Property(mOvershootOverlay, mEffectOvershootProperty), amount, TimePeriod(duration) ); + //mScrollOvershootAnimation.AnimateTo( Property(mOvershootOverlay, mEffectOvershootProperty), amount, TimePeriod(duration) ); mScrollOvershootAnimation.Play(); mAnimationStateFlags = animatingOn ? AnimatingIn : AnimatingOut; } } else { - mOvershootOverlay.SetProperty( mEffectOvershootProperty, amount); + //mOvershootOverlay.SetProperty( mEffectOvershootProperty, amount); } } @@ -360,7 +312,7 @@ void ScrollOvershootEffectRipple::OnOvershootAnimFinished(Animation& animation) if( mAnimationStateFlags & AnimatingOut ) { // should now be offscreen - mOvershootOverlay.SetVisible(false); + //mOvershootOverlay.SetVisible(false); } if( (mAnimationStateFlags & AnimateBack) ) { -- 2.7.4