cytoscape-cxtmenu
Advanced tools
Comparing version 2.7.0 to 2.7.1
@@ -299,16 +299,22 @@ /*! | ||
on: function(events, selector, fn){ | ||
var _fn = fn; | ||
if( selector === 'core'){ | ||
_fn = function( e ){ | ||
if( e.cyTarget === cy ){ // only if event target is directly core | ||
return fn.apply( this, [ e ] ); | ||
} | ||
}; | ||
} | ||
data.handlers.push({ | ||
events: events, | ||
selector: selector, | ||
fn: fn | ||
fn: _fn | ||
}); | ||
if( selector === 'core' ){ | ||
cy.on(events, function( e ){ | ||
if( e.cyTarget === cy ){ // only if event target is directly core | ||
return fn.apply( this, [ e ] ); | ||
} | ||
}); | ||
cy.on(events, _fn); | ||
} else { | ||
cy.on(events, selector, fn); | ||
cy.on(events, selector, _fn); | ||
} | ||
@@ -315,0 +321,0 @@ |
{ | ||
"name": "cytoscape-cxtmenu", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "A context menu for Cytoscape.js", | ||
@@ -5,0 +5,0 @@ "main": "cytoscape-cxtmenu.js", |
602081
1878