Merged in jesusmgg/unity-ui-extensions (pull request #39)

Fixed: Reordearable List resizing items when moving to empty lists.
pull/413/head
Jesús María González Martínez 2018-12-17 16:09:25 +00:00 committed by Simon Jackson
commit 2a3003f97e
1 changed files with 3 additions and 3 deletions

View File

@ -88,7 +88,6 @@ namespace UnityEngine.UI.Extensions
_fakeElement = new GameObject("Fake").AddComponent<RectTransform>();
_fakeElementLE = _fakeElement.gameObject.AddComponent<LayoutElement>();
RefreshSizes();
//Send OnElementGrabbed Event
@ -315,10 +314,11 @@ namespace UnityEngine.UI.Extensions
size = firstChild.GetComponent<RectTransform>().rect.size;
}
}
_draggingObject.sizeDelta = size;
_fakeElementLE.preferredHeight = _draggingObjectLE.preferredHeight = size.y;
_fakeElementLE.preferredWidth = _draggingObjectLE.preferredWidth = size.x;
_fakeElement.GetComponent<RectTransform>().sizeDelta = size;
}
public void Init(ReorderableList reorderableList)
@ -327,4 +327,4 @@ namespace UnityEngine.UI.Extensions
_rect = GetComponent<RectTransform>();
}
}
}
}