- }
-
- // Scale Delta ///////////////////////////////////////////////////////
- if(scaleChanged)
- {
- if(totalDuration > Math::MACHINE_EPSILON_1)
- {
- mSnapAnimation = Animation::New(totalDuration);
- mSnapAnimation.FinishedSignal().Connect(this, &ScrollView::OnScrollAnimationFinished);
- // TODO: for non-uniform scaling to different bounds e.g. scaling a square to a 4:3 aspect ratio screen with a velocity
- // the height will hit first, and then the width, so that would require two different animation times just like position.
- mSnapAnimation.AnimateTo( Property(self, mPropertyScale), scale, alpha, TimePeriod(0.0f, scaleDuration.x));
-
- mSnapAnimation.AnimateTo( Property(self, mPropertyTime), totalDuration, AlphaFunctions::Linear );
- mSnapAnimation.Play();
- }
- else
- {
- self.SetProperty(mPropertyScale, scale);