cytoscape-cxtmenu
Advanced tools
Comparing version 2.7.1 to 2.8.0
@@ -52,3 +52,4 @@ /*! | ||
itemTextShadowColor: 'black', // the text shadow colour of the command's content | ||
zIndex: 9999 // the z-index of the ui div | ||
zIndex: 9999, // the z-index of the ui div | ||
atMouse: false // draw menu at mouse position | ||
}; | ||
@@ -300,3 +301,3 @@ | ||
on: function(events, selector, fn){ | ||
var _fn = fn; | ||
@@ -310,3 +311,3 @@ if( selector === 'core'){ | ||
} | ||
data.handlers.push({ | ||
@@ -379,3 +380,3 @@ events: events, | ||
var rp, rw, rh; | ||
if( !isCy && ele.isNode() ){ | ||
if( !isCy && ele.isNode() && !options.atMouse ){ | ||
rp = ele.renderedPosition(); | ||
@@ -382,0 +383,0 @@ rw = ele.renderedWidth(); |
{ | ||
"name": "cytoscape-cxtmenu", | ||
"version": "2.7.1", | ||
"version": "2.8.0", | ||
"description": "A context menu for Cytoscape.js", | ||
@@ -5,0 +5,0 @@ "main": "cytoscape-cxtmenu.js", |
@@ -73,3 +73,3 @@ cytoscape-cxtmenu | ||
fillColor: 'rgba(200, 200, 200, 0.75)', // optional: custom background color for item | ||
content: 'a command name' // html/text content to be displayed in the menu | ||
content: 'a command name', // html/text content to be displayed in the menu | ||
select: function(ele){ // a function to execute when the command is selected | ||
@@ -92,3 +92,4 @@ console.log( ele.id() ) // `ele` holds the reference to the active element | ||
itemTextShadowColor: 'black', // the text shadow colour of the command's content | ||
zIndex: 9999 // the z-index of the ui div | ||
zIndex: 9999, // the z-index of the ui div | ||
atMouse: false // draw menu at mouse position | ||
}; | ||
@@ -95,0 +96,0 @@ |
602182
1879
114