Commit 23cea112 authored by 神楽坂玲奈's avatar 神楽坂玲奈

scroll

parent 28cd6ccc
...@@ -320,31 +320,31 @@ public class UIScrollView : MonoBehaviour ...@@ -320,31 +320,31 @@ public class UIScrollView : MonoBehaviour
mPanel.clipping = UIDrawCall.Clipping.ConstrainButDontClip; mPanel.clipping = UIDrawCall.Clipping.ConstrainButDontClip;
// Auto-upgrade // Auto-upgrade
if (movement != Movement.Custom && scale.sqrMagnitude > 0.001f) // if (movement != Movement.Custom && scale.sqrMagnitude > 0.001f)
{ // {
if (scale.x == 1f && scale.y == 0f) // if (scale.x == 1f && scale.y == 0f)
{ // {
movement = Movement.Horizontal; // movement = Movement.Horizontal;
} // }
else if (scale.x == 0f && scale.y == 1f) // else if (scale.x == 0f && scale.y == 1f)
{ // {
movement = Movement.Vertical; // movement = Movement.Vertical;
} // }
else if (scale.x == 1f && scale.y == 1f) // else if (scale.x == 1f && scale.y == 1f)
{ // {
movement = Movement.Unrestricted; // movement = Movement.Unrestricted;
} // }
else // else
{ // {
movement = Movement.Custom; // movement = Movement.Custom;
customMovement.x = scale.x; // customMovement.x = scale.x;
customMovement.y = scale.y; // customMovement.y = scale.y;
} // }
scale = Vector3.zero; // scale = Vector3.zero;
#if UNITY_EDITOR // #if UNITY_EDITOR
NGUITools.SetDirty(this); // NGUITools.SetDirty(this);
#endif // #endif
} // }
// Auto-upgrade // Auto-upgrade
if (contentPivot == UIWidget.Pivot.TopLeft && relativePositionOnReset != Vector2.zero) if (contentPivot == UIWidget.Pivot.TopLeft && relativePositionOnReset != Vector2.zero)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment