MCPcopy Index your code
hub / github.com/CoderLine/alphaTab / open

Method open

packages/playground/src/components/NavMenu.ts:138–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136 }
137
138 private open(): void {
139 if (!this.popover.parentElement) {
140 document.body.appendChild(this.popover);
141 }
142 if (!this.popper) {
143 this.popper = createPopper(this.trigger, this.popover, {
144 placement: 'bottom-end',
145 modifiers: [{ name: 'offset', options: { offset: [0, 6] } }]
146 });
147 } else {
148 this.popper.update();
149 }
150 this.isOpen = true;
151 this.popover.classList.add('open');
152 this.trigger.setAttribute('aria-expanded', 'true');
153 document.addEventListener('mousedown', this.outsideClick, true);
154 document.addEventListener('keydown', this.onKey, true);
155 }
156
157 private close(): void {
158 this.isOpen = false;

Callers 1

constructorMethod · 0.95

Calls 4

addMethod · 0.80
appendChildMethod · 0.65
updateMethod · 0.65
addEventListenerMethod · 0.65

Tested by

no test coverage detected