Commit 20f0547a authored by techird's avatar techird

修改展开按钮的位置

parent badc9a99
...@@ -24,13 +24,13 @@ KityMinder.registerConnectProvider('under', function(node, parent, connection, w ...@@ -24,13 +24,13 @@ KityMinder.registerConnectProvider('under', function(node, parent, connection, w
var p1, p2, p3, mx; var p1, p2, p3, mx;
if (side == 'right') { if (side == 'right') {
p1 = new kity.Point(pBox.right + 10, startY); p1 = new kity.Point(pBox.right, startY);
p2 = new kity.Point(box.left, underY); p2 = new kity.Point(box.left - 10, underY);
p3 = new kity.Point(box.right + 10, underY); p3 = new kity.Point(box.right, underY);
} else { } else {
p1 = new kity.Point(pBox.left - 10, startY); p1 = new kity.Point(pBox.left, startY);
p2 = new kity.Point(box.right, underY); p2 = new kity.Point(box.right + 10, underY);
p3 = new kity.Point(box.left - 10, underY); p3 = new kity.Point(box.left, underY);
} }
mx = (p1.x + p2.x) / 2; mx = (p1.x + p2.x) / 2;
......
...@@ -233,8 +233,8 @@ KityMinder.registerModule('Expand', function() { ...@@ -233,8 +233,8 @@ KityMinder.registerModule('Expand', function() {
expander.setState(visible && node.children.length ? node.getData(EXPAND_STATE_DATA) : 'hide'); expander.setState(visible && node.children.length ? node.getData(EXPAND_STATE_DATA) : 'hide');
var vector = node.getLayoutVectorOut().normalize(expander.radius + node.getStyle('stroke-width')); var vector = node.getLayoutVectorIn().normalize(expander.radius + node.getStyle('stroke-width'));
var position = node.getVertexOut().offset(vector); var position = node.getVertexIn().offset(vector.reverse());
this.expander.setTranslate(position); this.expander.setTranslate(position);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment