diff --git a/Kieker.WebGUI/src/main/webapp/js/flowEditor.js b/Kieker.WebGUI/src/main/webapp/js/flowEditor.js index 90afa0eec4be6291cd335a4c386c34b035f72c09..b02decedc6e2c3e6f83a471f275901c201fa28b8 100644 --- a/Kieker.WebGUI/src/main/webapp/js/flowEditor.js +++ b/Kieker.WebGUI/src/main/webapp/js/flowEditor.js @@ -957,7 +957,7 @@ function GraphFlow(){ if(isAnimated){ endPos.x = x; endPos.y = y; - node.setPos(endPos, "end"); + node.setPos(endPos, 'end'); node.setData('width', width, 'end'); node.setData('height', height, 'end'); }else{ @@ -1410,7 +1410,7 @@ function GraphFlow(){ var canvas = fd.canvas, scale = canvas.scaleOffsetX, centerX = -canvas.translateOffsetX / scale, - centerY = -canvas.translateOffsetX / scale; + centerY = -canvas.translateOffsetY / scale; return {'x' : centerX, 'y' : centerY}; } @@ -1866,6 +1866,8 @@ function GraphFlow(){ } */ + var pos = new $jit.Complex(0,0); + var maxPorts = Math.max(countInput, countRepo+countOutput+0.5), size = vertexLabelSize*2; @@ -1945,8 +1947,15 @@ function GraphFlow(){ closeButton.data.$family = newNode; // set node positions - newNode.pos.setc(xPosition, yPosition); - closeButton.pos.setc(xPosition + (width - vertexLabelSize) / 2 , yPosition - height / 2 + size); + pos.x = xPosition; + pos.y = yPosition; + newNode.setPos(pos, 'current'); + newNode.setPos(pos, 'end'); + + pos.x = xPosition + (width - vertexLabelSize) / 2; + pos.y = yPosition - height / 2 + size; + closeButton.setPos(pos, 'current'); + closeButton.setPos(pos, 'end'); newNode.data.$children.push(closeButton); // Loop Info: @@ -2017,11 +2026,13 @@ function GraphFlow(){ g.addNode(newPort); newPort = g.getNode(newPort.id); - newPort.pos.setc(x, y); + pos.x = x; + pos.y = y; + newPort.setPos(pos, 'current'); + newPort.setPos(pos, 'end'); newNode.data.$children.push(newPort); y += size; - //} } } }