/*
- * 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.
#include <dali/public-api/events/mouse-wheel-event.h>
#include <dali/public-api/events/touch-event.h>
#include <dali/public-api/object/type-registry.h>
-#include <dali/public-api/object/type-registry-helper.h>
+#include <dali/devel-api/object/type-registry-helper.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
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() )
{