diff --git a/Kieker.WebGUI/src/main/webapp/js/jit.js b/Kieker.WebGUI/src/main/webapp/js/jit.js index 23d8d636b4f55d832765cbcd7934dbdccc4acb33..4cec46fc002c3ec19151c30f420ad7e5871e57d8 100644 --- a/Kieker.WebGUI/src/main/webapp/js/jit.js +++ b/Kieker.WebGUI/src/main/webapp/js/jit.js @@ -17674,14 +17674,16 @@ $jit.GraphFlow.$extend = true; }, 'contains': function(node, pos){ - var npos = node.pos.getc(true), - dim = node.data.$dim/2, - width = node.data.$width/2 -dim, - height = node.data.$height/2 -dim, - checkPosX = pos.x - npos.x, - checkPosY = pos.y - npos.y; - var notInCloseButton = (checkPosX < width-dim || checkPosY > dim-height); - return notInCloseButton && Math.abs(checkPosX) <= width && Math.abs(checkPosY) <= height; + var npos = node.pos.getc(true); + var dim = node.data.$dim/2; + var width = node.data.$width/2 -dim; + var height = node.data.$height/2 -dim; + var checkPosX = pos.x - npos.x; + var checkPosY = pos.y - npos.y; + + var inBounds = Math.abs(checkPosX) <= width && Math.abs(checkPosY) <= height; + var notInCloseButton = (checkPosX < width - dim || checkPosY > dim - height); + return notInCloseButton && inBounds; } },