FloatRectangle presentationBounds = const_cast<VisualElement*>((__pVisualElement)->AcquirePresentationInstance())->GetBounds();
FloatRectangle modelBounds = __pVisualElement->GetBounds();
- __presentationBounds = presentationBounds;
+ __presentationBounds = modelBounds;
float currentAnchorX = presentationBounds.width * anchorX;
float currentAnchorY = presentationBounds.height * anchorY;
float endAnchorX = endWidth * anchorX;
float endAnchorY = endHeight * anchorY;
- float startX = presentationBounds.x + (currentAnchorX - startAnchorX);
- float startY = presentationBounds.y + (currentAnchorY - startAnchorY);
+ float startX = modelBounds.x + (currentAnchorX - startAnchorX);
+ float startY = modelBounds.y + (currentAnchorY - startAnchorY);
float endX = modelBounds.x + (currentAnchorX - endAnchorX);
float endY = modelBounds.y + (currentAnchorY - endAnchorY);
else
{
if (pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_POSITION) ||
- pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_SIZE))
+ pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_SIZE))
{
- __logicalBoundsHolder = __pControl->GetBounds();
- setLogicalBnds = true;
+ Rectangle controlRect = __pControl->GetBounds();
+ if(animTarget == ANIMATION_TARGET_POSITION)
+ {
+ setLogicalBnds = true;
+ __logicalBoundsHolder.x = controlRect.x;
+ __logicalBoundsHolder.y = controlRect.y;
+ }
+ else if(animTarget == ANIMATION_TARGET_SIZE)
+ {
+ setLogicalBnds = true;
+ __logicalBoundsHolder.width = controlRect.width;
+ __logicalBoundsHolder.height = controlRect.height;
+ }
}
else if (pParallelAnimGrp->IsAnimationAdded(ANIMATION_TARGET_ALPHA))
{
if ((propName.IndexOf(VeSubPropBoundsPosition, startIndex, indexOf)) == E_SUCCESS)
{
- r = pPresentationImpl->SetProperty(VePropBounds, __pVisualElement->GetBounds());
+ r = pPresentationImpl->SetProperty(VeSubPropBoundsPosition, FloatPoint(__pVisualElement->GetBounds().x, __pVisualElement->GetBounds().y));
}
else if ((propName.IndexOf(VePropBounds, startIndex, indexOf)) == E_SUCCESS)
{
float diffX = 0.0f;
float diffY = 0.0f;
- if (!pAnimation->IsEndValueApplied() && (__isAnimationTargetAnimating[ANIMATION_TARGET_POSITION]))
+ if (__isAnimationTargetAnimating[ANIMATION_TARGET_POSITION])
{
diffX = pPresentation->GetBounds().x + currentValue.ToFloatRectangle().x - __presentationBounds.x;
diffY = pPresentation->GetBounds().y + currentValue.ToFloatRectangle().y - __presentationBounds.y;
}
else
{
- diffX = pPresentation->GetBounds().x;
- diffY = pPresentation->GetBounds().y;
+ diffX = currentValue.ToFloatRectangle().x;
+ diffY = currentValue.ToFloatRectangle().y;
}
Variant newBounds(FloatRectangle(diffX, diffY, currentValue.ToFloatRectangle().width, currentValue.ToFloatRectangle().height));
FloatRectangle presentationBounds = const_cast<VisualElement*>((__pVisualElement)->AcquirePresentationInstance())->GetBounds();
FloatRectangle modelBounds = __pVisualElement->GetBounds();
- __presentationBounds = presentationBounds;
+ __presentationBounds = modelBounds;
float startX = presentationBounds.x;
float startY = presentationBounds.y;