Пример #1
0
    IEnumerator RefreshPanelsLayoutRoutine(ICardManagerModel model)
    {
        ViewState view = model.GetViewState();

        if (view.IsValid())
        {
            SetOrganizedPanels(!view.customLayout);
        }
        else
        {
            SetOrganizedPanels(true);
        }

        yield return(PanelPlacementRoutine(model));

        if (view.IsValid())
        {
            zoomableRect.SetCanvasScale(view.scale);
            zoomableRect.SetAbsolutePosition(view.viewPosition);
        }
        else
        {
            ZoomOutToAllPanels();
        }

        ShowPanelCanvas();
    }