reset local scale for overlay and scrollbar on toggle (fixes issue #15)

Fixed by @jeffssmith1 https://bitbucket.org/ddreaper/unity-ui-extensions/issues/15#comment-18792458
pull/413/head
Chris Charabaruk 2015-08-21 22:56:47 -04:00
parent 9584677329
commit 78c410766a
1 changed files with 2 additions and 0 deletions

View File

@ -277,6 +277,8 @@ namespace UnityEngine.UI.Extensions
/// <param name="directClick"> whether an item was directly clicked on</param> /// <param name="directClick"> whether an item was directly clicked on</param>
public void ToggleDropdownPanel(bool directClick) public void ToggleDropdownPanel(bool directClick)
{ {
_overlayRT.transform.localScale = new Vector3(1, 1, 1);
_scrollBarRT.transform.localScale = new Vector3(1, 1, 1);
_isPanelActive = !_isPanelActive; _isPanelActive = !_isPanelActive;
_overlayRT.gameObject.SetActive(_isPanelActive); _overlayRT.gameObject.SetActive(_isPanelActive);
if (_isPanelActive) if (_isPanelActive)