MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator / disableSubmenuScrolling

Function disableSubmenuScrolling

docs/html/menu.js:363–385  ·  view source on GitHub ↗
(submenu)

Source from the content-addressed store, hash-verified

361
362 // Helper function to clean up scroll arrows
363 function disableSubmenuScrolling(submenu) {
364 if (!submenu.dataset.scrollEnabled) return;
365
366 delete submenu.dataset.scrollEnabled;
367
368 // Find and remove scroll elements
369 const scrollArrows = submenu.querySelectorAll('.submenu-scroll-arrow');
370 const scrollWrapper = submenu.querySelector('.submenu-scroll-wrapper');
371
372 if (scrollWrapper) {
373 // Move children back to submenu
374 while (scrollWrapper.firstChild) {
375 submenu.appendChild(scrollWrapper.firstChild);
376 }
377 scrollWrapper.remove();
378 }
379
380 scrollArrows.forEach(arrow => arrow.remove());
381
382 // Reset styles
383 submenu.style.maxHeight = '';
384 submenu.style.overflow = '';
385 }
386
387 menuItems.forEach(item => {
388 const submenu = item.querySelector('ul');

Callers 2

initDropdownMenuFunction · 0.85
toggleMenuFunction · 0.85

Calls 1

removeMethod · 0.80

Tested by

no test coverage detected