Fix property value panel layout update.
This commit is contained in:
@@ -24,10 +24,6 @@ namespace Cryville.Crtr.Browsing {
|
||||
const float SPEED = 8;
|
||||
float _ratio;
|
||||
#pragma warning disable IDE0051
|
||||
void Start() {
|
||||
m_handleArea.sizeDelta = new Vector2(m_handle.rect.height - m_handle.rect.width, 0);
|
||||
}
|
||||
|
||||
void Update() {
|
||||
if (_value && _ratio != 1) {
|
||||
_ratio += SPEED * Time.deltaTime;
|
||||
@@ -40,6 +36,10 @@ namespace Cryville.Crtr.Browsing {
|
||||
UpdateGraphics();
|
||||
}
|
||||
}
|
||||
|
||||
void OnRectTransformDimensionsChange() {
|
||||
m_handleArea.sizeDelta = new Vector2(m_handle.rect.height - m_handle.rect.width, 0);
|
||||
}
|
||||
#pragma warning restore IDE0051
|
||||
|
||||
void UpdateGraphics() {
|
||||
|
@@ -60,7 +60,6 @@ namespace Cryville.Crtr.Browsing {
|
||||
ev.callback.AddListener(e => OnPointerClick((PointerEventData)e));
|
||||
m_ctn.triggers.Add(ev);
|
||||
|
||||
m_handleArea.sizeDelta = new Vector2(m_handle.rect.height - m_handle.rect.width, 0);
|
||||
if (MaxStep != 0) SetRatio(0.5f);
|
||||
}
|
||||
|
||||
@@ -70,6 +69,10 @@ namespace Cryville.Crtr.Browsing {
|
||||
SetValueFromPos(pp);
|
||||
}
|
||||
}
|
||||
|
||||
void OnRectTransformDimensionsChange() {
|
||||
m_handleArea.sizeDelta = new Vector2(m_handle.rect.height - m_handle.rect.width, 0);
|
||||
}
|
||||
#pragma warning restore IDE0051
|
||||
|
||||
Vector2 pp;
|
||||
|
Reference in New Issue
Block a user