Skip to content

Commit 576dcc2

Browse files
committed
Generate dist
1 parent f48abc5 commit 576dcc2

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

dist/jquery.contextMenu.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* MIT License http://www.opensource.org/licenses/mit-license
1313
* GPL v3 http://opensource.org/licenses/GPL-3.0
1414
*
15-
* Date: 2015-12-17T20:34:43.837Z
15+
* Date: 2015-12-20T18:49:14.965Z
1616
*/
1717

1818
(function (factory) {
@@ -268,7 +268,7 @@
268268
if ((e.data.trigger !== 'right' && e.data.trigger !== 'demand') && e.originalEvent) {
269269
return;
270270
}
271-
271+
272272
// Let the current contextmenu decide if it should show or not based on its own trigger settings
273273
if (e.mouseButton !== undefined && e.data) {
274274
if (!(e.data.trigger == 'left' && e.mouseButton === 0) && !(e.data.trigger == 'right' && e.mouseButton === 2)) {
@@ -897,7 +897,12 @@
897897

898898
// make sure we're in front
899899
if (opt.zIndex) {
900-
css.zIndex = zindex($trigger) + opt.zIndex;
900+
var additionalZValue = opt.zIndex;
901+
// If opt.zIndex is a function, call the function to get the right zIndex.
902+
if (typeof opt.zIndex === 'function') {
903+
additionalZValue = opt.zIndex.call($trigger, opt);
904+
}
905+
css.zIndex = zindex($trigger) + additionalZValue;
901906
}
902907

903908
// add layer

0 commit comments

Comments
 (0)