MCPcopy
hub / github.com/helloxz/onenav / finishPromiseProcess

Function finishPromiseProcess

static/jQuery-contextMenu/jquery.contextMenu.js:1562–1571  ·  view source on GitHub ↗
(opt, root, items)

Source from the content-addressed store, hash-verified

1560 }
1561
1562 function finishPromiseProcess(opt, root, items) {
1563 if (typeof root.$menu === 'undefined' || !root.$menu.is(':visible')) {
1564 return;
1565 }
1566 opt.$node.removeClass(root.classNames.iconLoadingClass);
1567 opt.items = items;
1568 op.create(opt, root, true); // Create submenu
1569 op.update(opt, root); // Correctly update position if user is already hovered over menu item
1570 root.positionSubmenu.call(opt.$node, opt.$menu); // positionSubmenu, will only do anything if user already hovered over menu item that just got new subitems.
1571 }
1572
1573 // Wait for promise completion. .then(success, error, notify) (we don't track notify). Bind the opt
1574 // and root to avoid scope problems

Callers 2

completedPromiseFunction · 0.85
errorPromiseFunction · 0.85

Calls 1

updateMethod · 0.80

Tested by

no test coverage detected