Пример #1
0
        public void Render(HtmlElement targetElem)
        {
            containerElem = document.CreateElement("div", @class: "render-manager-container");

            document.AddEventListener("click", evnt => {
                if (menuElem == null)
                {
                    return;
                }
                else if (evnt.Target == menuButtonElem)
                {
                    menuElem.AddCssClass("open");
                }
                else
                {
                    menuElem.RemoveCssClass("open");
                }
            });

            BuildExpander();

            if (itemStates.Count > 1)
            {
                BuildMenu();
            }
            else
            {
                menuElem       = null;
                menuButtonElem = null;
            }

            targetElem.AppendChild(containerElem);

            SelectItem(0);
        }