File tree 3 files changed +11
-6
lines changed
3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 12
12
* MIT License http://www.opensource.org/licenses/mit-license
13
13
* GPL v3 http://opensource.org/licenses/GPL-3.0
14
14
*
15
- * Date: 2015-12-17T20:34:43.837Z
15
+ * Date: 2015-12-20T18:49:14.965Z
16
16
*/
17
17
18
18
( function ( factory ) {
268
268
if ( ( e . data . trigger !== 'right' && e . data . trigger !== 'demand' ) && e . originalEvent ) {
269
269
return ;
270
270
}
271
-
271
+
272
272
// Let the current contextmenu decide if it should show or not based on its own trigger settings
273
273
if ( e . mouseButton !== undefined && e . data ) {
274
274
if ( ! ( e . data . trigger == 'left' && e . mouseButton === 0 ) && ! ( e . data . trigger == 'right' && e . mouseButton === 2 ) ) {
897
897
898
898
// make sure we're in front
899
899
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 ;
901
906
}
902
907
903
908
// add layer
You can’t perform that action at this time.
0 commit comments