src/cueUtilities.js
function(node, e){
			if (node){
				var currMousePos = e.position || e.cyPosition;
				var topLeft = {
					x: (node.position("x") - node.width() / 2 - parseFloat(node.css('padding-left'))),
					y: (node.position("y") - node.height() / 2 - parseFloat(node.css('padding-top')))};
				var bottomRight = {
					x: (node.position("x") + node.width() / 2 + parseFloat(node.css('padding-right'))),
					y: (node.position("y") + node.height() / 2+ parseFloat(node.css('padding-bottom')))};

				if (currMousePos.x >= topLeft.x && currMousePos.y >= topLeft.y &&
					currMousePos.x <= bottomRight.x && currMousePos.y <= bottomRight.y){
					return true;
				}
			}
			return false;
		}
function(node, e){
			if (node){
				var currMousePos = e.position || e.cyPosition;
				var topLeft = {
					x: (node.position("x") - node.width() / 2 - parseFloat(node.css('padding-left'))),
					y: (node.position("y") - node.height() / 2 - parseFloat(node.css('padding-top')))};
				var bottomRight = {
					x: (node.position("x") + node.width() / 2 + parseFloat(node.css('padding-right'))),
					y: (node.position("y") + node.height() / 2+ parseFloat(node.css('padding-bottom')))};

				if (currMousePos.x >= topLeft.x && currMousePos.y >= topLeft.y &&
					currMousePos.x <= bottomRight.x && currMousePos.y <= bottomRight.y){
					return true;
				}
			}
			return false;
		}
function ( node , e ) { if ( node ) { var currMousePos = e . position || e . cyPosition ; var topLeft = { x : ( node . position ( "x" ) - node . width ( ) / 2 - parseFloat ( node . css ( 'padding-left' ) ) ) , y : ( node . position ( "y" ) - node . height ( ) / 2 - parseFloat ( node . css ( 'padding-top' ) ) ) } ; var bottomRight = { x : ( node . position ( "x" ) + node . width ( ) / 2 + parseFloat ( node . css ( 'padding-right' ) ) ) , y : ( node . position ( "y" ) + node . height ( ) / 2 + parseFloat ( node . css ( 'padding-bottom' ) ) ) } ; if ( currMousePos . x >= topLeft . x && currMousePos . y >= topLeft . y && currMousePos . x <= bottomRight . x && currMousePos . y <= bottomRight . y ) { return true ; } } return false ; }
check if mouse is inside given node
check if mouse is inside given node