Merged in jesusmgg/unity-ui-extensions (pull request #39)
Fixed: Reordearable List resizing items when moving to empty lists.pull/413/head
commit
2a3003f97e
|
@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue