/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
self.SetProperty(Toolkit::Scrollable::Property::CAN_SCROLL_VERTICAL, mCanScrollVertical);
self.SetProperty(Toolkit::Scrollable::Property::CAN_SCROLL_HORIZONTAL, mCanScrollHorizontal);
- Vector3 size = GetControlSize();
- UpdatePropertyDomain(size);
+ UpdatePropertyDomain();
SetInternalConstraints();
}
{
mRulerX = ruler;
- Vector3 size = GetControlSize();
- UpdatePropertyDomain(size);
+ UpdatePropertyDomain();
UpdateMainInternalConstraint();
}
{
mRulerY = ruler;
- Vector3 size = GetControlSize();
- UpdatePropertyDomain(size);
+ UpdatePropertyDomain();
UpdateMainInternalConstraint();
}
-void ScrollView::UpdatePropertyDomain(const Vector3& size)
+void ScrollView::UpdatePropertyDomain()
{
Actor self = Self();
+ Vector3 size = self.GetTargetSize();
Vector2 min = mMinScroll;
Vector2 max = mMaxScroll;
bool scrollPositionChanged = false;
void ScrollView::OnSizeAnimation(Animation& animation, const Vector3& targetSize)
{
// need to update domain properties for new size
- UpdatePropertyDomain(targetSize);
+ UpdatePropertyDomain();
}
void ScrollView::OnControlSizeSet( const Vector3& size )
mMaxOvershoot = mUserMaxOvershoot;
}
}
- UpdatePropertyDomain(size);
+ UpdatePropertyDomain();
UpdateMainInternalConstraint();
if( IsOvershootEnabled() )
{