Skip to content

Commit a9d320d

Browse files
committed
Regenerate dist
1 parent 3b06455 commit a9d320d

11 files changed

+59
-12
lines changed

dist/font/context-menu-icons.eot

0 Bytes
Binary file not shown.

dist/font/context-menu-icons.ttf

0 Bytes
Binary file not shown.

dist/font/context-menu-icons.woff

0 Bytes
Binary file not shown.

dist/font/context-menu-icons.woff2

8 Bytes
Binary file not shown.

dist/jquery.contextMenu.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Licensed under
1313
* MIT License http://www.opensource.org/licenses/mit-license
1414
*
15-
* Date: 2017-08-30T12:16:04.938Z
15+
* Date: 2017-09-08T12:01:36.942Z
1616
*/
1717
@-webkit-keyframes cm-spin {
1818
0% {
@@ -54,8 +54,8 @@
5454
font-style: normal;
5555
font-weight: normal;
5656

57-
src: url("font/context-menu-icons.eot?1915n");
58-
src: url("font/context-menu-icons.eot?1915n#iefix") format("embedded-opentype"), url("font/context-menu-icons.woff2?1915n") format("woff2"), url("font/context-menu-icons.woff?1915n") format("woff"), url("font/context-menu-icons.ttf?1915n") format("truetype");
57+
src: url("font/context-menu-icons.eot?12di9");
58+
src: url("font/context-menu-icons.eot?12di9#iefix") format("embedded-opentype"), url("font/context-menu-icons.woff2?12di9") format("woff2"), url("font/context-menu-icons.woff?12di9") format("woff"), url("font/context-menu-icons.ttf?12di9") format("truetype");
5959
}
6060

6161
.context-menu-icon-add:before {

dist/jquery.contextMenu.js

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Licensed under
1212
* MIT License http://www.opensource.org/licenses/mit-license
1313
*
14-
* Date: 2017-08-30T12:16:04.336Z
14+
* Date: 2017-09-08T12:01:36.877Z
1515
*/
1616

1717
// jscs:disable
@@ -116,6 +116,10 @@
116116
// flag denoting if a second trigger should simply move (true) or rebuild (false) an open menu
117117
// as long as the trigger happened on one of the trigger-element's child nodes
118118
reposition: true,
119+
// Flag denoting if a second trigger should close the menu, as long as
120+
// the trigger happened on one of the trigger-element's child nodes.
121+
// This overrides the reposition option.
122+
hideOnSecondTrigger: false,
119123

120124
//ability to select submenu
121125
selectableSubMenu: false,
@@ -236,7 +240,8 @@
236240
// events
237241
events: {
238242
show: $.noop,
239-
hide: $.noop
243+
hide: $.noop,
244+
activated: $.noop
240245
},
241246
// default callback
242247
callback: null,
@@ -471,7 +476,12 @@
471476
$(target).trigger(e);
472477
root.$layer.show();
473478
}
474-
479+
480+
if (root.hideOnSecondTrigger && triggerAction && root.$menu !== null && typeof root.$menu !== 'undefined') {
481+
root.$menu.trigger('contextmenu:hide');
482+
return;
483+
}
484+
475485
if (root.reposition && triggerAction) {
476486
if (document.elementFromPoint) {
477487
if (root.$trigger.is(target)) {
@@ -997,6 +1007,9 @@
9971007
// position and show context menu
9981008
opt.$menu.css(css)[opt.animation.show](opt.animation.duration, function () {
9991009
$trigger.trigger('contextmenu:visible');
1010+
1011+
op.activated(opt);
1012+
opt.events.activated();
10001013
});
10011014
// make options available and set state
10021015
$trigger
@@ -1527,6 +1540,26 @@
15271540
// Wait for promise completion. .then(success, error, notify) (we don't track notify). Bind the opt
15281541
// and root to avoid scope problems
15291542
promise.then(completedPromise.bind(this, opt, root), errorPromise.bind(this, opt, root));
1543+
},
1544+
// operation that will run after contextMenu showed on screen
1545+
activated: function(opt){
1546+
var $menu = opt.$menu;
1547+
var $menuOffset = $menu.offset();
1548+
var winHeight = $(window).height();
1549+
var winScrollTop = $(window).scrollTop();
1550+
var menuHeight = $menu.height();
1551+
if(menuHeight > winHeight){
1552+
$menu.css({
1553+
'height' : winHeight + 'px',
1554+
'overflow-x': 'hidden',
1555+
'overflow-y': 'auto',
1556+
'top': winScrollTop + 'px'
1557+
});
1558+
} else if(($menuOffset.top < winScrollTop) || ($menuOffset.top + menuHeight > winScrollTop + winHeight)){
1559+
$menu.css({
1560+
'top': '0px'
1561+
});
1562+
}
15301563
}
15311564
};
15321565

@@ -1616,6 +1649,20 @@
16161649
}
16171650

16181651
switch (operation) {
1652+
1653+
case 'update':
1654+
// Updates visibility and such
1655+
if(_hasContext){
1656+
op.update($context);
1657+
} else {
1658+
for(var menu in menus){
1659+
if(menus.hasOwnProperty(menu)){
1660+
op.update(menus[menu]);
1661+
}
1662+
}
1663+
}
1664+
break;
1665+
16191666
case 'create':
16201667
// no selector no joy
16211668
if (!o.selector) {

dist/jquery.contextMenu.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)