Merged in jesusmgg/unity-ui-extensions (pull request #39)
Fixed: Reordearable List resizing items when moving to empty lists.release
commit
2a3003f97e
|
@ -88,7 +88,6 @@ namespace UnityEngine.UI.Extensions
|
||||||
_fakeElement = new GameObject("Fake").AddComponent<RectTransform>();
|
_fakeElement = new GameObject("Fake").AddComponent<RectTransform>();
|
||||||
_fakeElementLE = _fakeElement.gameObject.AddComponent<LayoutElement>();
|
_fakeElementLE = _fakeElement.gameObject.AddComponent<LayoutElement>();
|
||||||
|
|
||||||
|
|
||||||
RefreshSizes();
|
RefreshSizes();
|
||||||
|
|
||||||
//Send OnElementGrabbed Event
|
//Send OnElementGrabbed Event
|
||||||
|
@ -319,6 +318,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
_draggingObject.sizeDelta = size;
|
_draggingObject.sizeDelta = size;
|
||||||
_fakeElementLE.preferredHeight = _draggingObjectLE.preferredHeight = size.y;
|
_fakeElementLE.preferredHeight = _draggingObjectLE.preferredHeight = size.y;
|
||||||
_fakeElementLE.preferredWidth = _draggingObjectLE.preferredWidth = size.x;
|
_fakeElementLE.preferredWidth = _draggingObjectLE.preferredWidth = size.x;
|
||||||
|
_fakeElement.GetComponent<RectTransform>().sizeDelta = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Init(ReorderableList reorderableList)
|
public void Init(ReorderableList reorderableList)
|
||||||
|
|
Loading…
Reference in New Issue