Skip to content

Commit

Permalink
Missing 3.x api for event object
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkfranz committed May 4, 2017
1 parent a2e7686 commit 4894c46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cytoscape-qtip.js
Expand Up @@ -246,7 +246,7 @@ SOFTWARE.
var isNode = isEle && ele.isNode();
var cy = isCy ? ele : ele.cy();
var cOff = cy.container().getBoundingClientRect();
var pos = isNode ? ele.renderedPosition() : ( e ? e.cyRenderedPosition : undefined );
var pos = isNode ? ele.renderedPosition() : ( e ? e.renderedPosition || e.cyRenderedPosition : undefined );
if( !pos || pos.x == null || isNaN(pos.x) ){ return; }

var bb = isNode ? ele.renderedBoundingBox({
Expand Down Expand Up @@ -355,15 +355,15 @@ SOFTWARE.
qtip.$domEle.removeData('qtip'); // remove qtip dom/api ref to be safe

cy.on( opts.show.event, function(e){
if( !opts.show.cyBgOnly || (opts.show.cyBgOnly && e.cyTarget === cy) ){
if( !opts.show.cyBgOnly || (opts.show.cyBgOnly && (e.target === cy || e.cyTarget === cy)) ){
updatePosition(cy, qtip, e);

qtipApi.show();
}
} );

cy.on( opts.hide.event, function(e){
if( !opts.hide.cyBgOnly || (opts.hide.cyBgOnly && e.cyTarget === cy) ){
if( !opts.hide.cyBgOnly || (opts.hide.cyBgOnly && (e.target === cy || e.cyTarget === cy)) ){
qtipApi.hide();
}
} );
Expand Down

0 comments on commit 4894c46

Please sign in to comment.