- constraint = Constraint::New<Quaternion>( Actor::Property::ORIENTATION,
- ParentSource( Toolkit::Scrollable::Property::SCROLL_DIRECTION ),
- Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ),
- OvershootOverlayRotationConstraint() );
- mOvershootOverlay.ApplyConstraint(constraint);
-
- constraint = Constraint::New<Vector3>( Actor::Property::POSITION,
- ParentSource( Actor::Property::SIZE ),
- ParentSource( Toolkit::Scrollable::Property::SCROLL_DIRECTION ),
- Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ),
- OvershootOverlayPositionConstraint() );
- mOvershootOverlay.ApplyConstraint(constraint);
-
- constraint = Constraint::New<bool>( Actor::Property::VISIBLE,
- ParentSource( Toolkit::Scrollable::Property::CAN_SCROLL_VERTICAL ),
- OvershootOverlayVisibilityConstraint() );
- mOvershootOverlay.ApplyConstraint(constraint);
-
- constraint = Constraint::New<float>( effectOvershootPropertyIndex,
- Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ),
- EqualToConstraint() );
- mOvershootOverlay.ApplyConstraint(constraint);
+ constraint = Constraint::New<Quaternion>( mOvershootOverlay, Actor::Property::ORIENTATION, OvershootOverlayRotationConstraint );
+ constraint.AddSource( ParentSource( Toolkit::Scrollable::Property::SCROLL_DIRECTION ) );
+ constraint.AddSource( Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ) );
+ constraint.Apply();
+
+ constraint = Constraint::New<Vector3>( mOvershootOverlay, Actor::Property::POSITION, OvershootOverlayPositionConstraint );
+ constraint.AddSource( ParentSource( Actor::Property::SIZE ) );
+ constraint.AddSource( ParentSource( Toolkit::Scrollable::Property::SCROLL_DIRECTION ) );
+ constraint.AddSource( Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ) );
+ constraint.Apply();
+
+ constraint = Constraint::New<bool>( mOvershootOverlay, Actor::Property::VISIBLE, OvershootOverlayVisibilityConstraint );
+ constraint.AddSource( ParentSource( Toolkit::Scrollable::Property::CAN_SCROLL_VERTICAL ) );
+ constraint.Apply();
+
+ constraint = Constraint::New<float>( mOvershootOverlay, effectOvershootPropertyIndex, EqualToConstraint() );
+ constraint.AddSource( Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ) );
+ constraint.Apply();