diff --git a/mindplot/src/main/javascript/IconGroup.js b/mindplot/src/main/javascript/IconGroup.js index 307da4f7..6608acd9 100644 --- a/mindplot/src/main/javascript/IconGroup.js +++ b/mindplot/src/main/javascript/IconGroup.js @@ -18,14 +18,22 @@ mindplot.IconGroup = function(topic) { var offset = topic.getOffset(); + var text = topic.getTextShape(); + var yOffset = text.getPosition().y; + var shape = topic.getShapeType(); + if(shape==mindplot.NodeModel.SHAPE_TYPE_ELIPSE){ + yOffset +=2; + } else if( shape == mindplot.NodeModel.SHAPE_TYPE_LINE){ + yOffset -=2; + } this.options = { width:0, height:0, x:offset / 2, - y:offset / 2, + y:yOffset, icons:[], topic:topic, - nativeElem:new web2d.Group({width: 2, height:2,x: offset / 2, y:offset / 2, coordSizeWidth:1,coordSizeHeight:1}) + nativeElem:new web2d.Group({width: 2, height:2,x: offset / 2, y:yOffset, coordSizeWidth:1,coordSizeHeight:1}) }; this.registerListeners(); }; diff --git a/mindplot/src/main/javascript/MainTopic.js b/mindplot/src/main/javascript/MainTopic.js index 52e78a74..df8a2829 100644 --- a/mindplot/src/main/javascript/MainTopic.js +++ b/mindplot/src/main/javascript/MainTopic.js @@ -261,9 +261,9 @@ mindplot.MainTopic.prototype.workoutOutgoingConnectionPoint = function(targetPos // In this case, connetion line is not used as shape figure. result = mindplot.util.Shape.calculateRectConnectionPoint(pos, size, isAtRight, true); result.y = pos.y + (size.height / 2); - if(result.y>0){ + /*if(result.y>0){ result.y+=1; - } + }*/ // Correction factor ... if (!isAtRight)