mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 06:07:57 +01:00
fixing icon positions on elipse shape, and curve lines with line shapes
This commit is contained in:
parent
9a41f3b288
commit
df0a9a4496
@ -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();
|
||||
};
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user