Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
981e3975
Commit
981e3975
authored
Nov 03, 2015
by
张博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjust code of tianpan connect
parent
6858315f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
arc_tp.js
src/connect/arc_tp.js
+4
-8
No files found.
src/connect/arc_tp.js
View file @
981e3975
...
...
@@ -24,8 +24,7 @@ define(function(require, exports, module) {
*/
connect
.
register
(
'arc_tp'
,
function
(
node
,
parent
,
connection
,
width
,
color
)
{
var
end_box
=
node
.
getLayoutBox
(),
start_box
=
parent
.
getLayoutBox
(),
next_end_box
=
null
;
start_box
=
parent
.
getLayoutBox
();
var
index
=
node
.
getIndex
();
var
nextNode
=
parent
.
getChildren
()[
index
+
1
];
...
...
@@ -35,12 +34,8 @@ define(function(require, exports, module) {
start_box
=
parent
.
getChildren
()[
index
-
1
].
getLayoutBox
();
}
if
(
nextNode
)
{
next_end_box
=
nextNode
.
getLayoutBox
();
}
var
start
,
end
,
vector
,
next_end
;
var
start
,
end
,
vector
;
var
abs
=
Math
.
abs
;
var
pathData
=
[];
var
side
=
end_box
.
x
>
start_box
.
x
?
'right'
:
'left'
;
...
...
@@ -50,7 +45,6 @@ define(function(require, exports, module) {
start
=
new
kity
.
Point
(
start_box
.
cx
,
start_box
.
cy
);
end
=
new
kity
.
Point
(
end_box
.
cx
,
end_box
.
cy
);
next_end
=
next_end_box
?
new
kity
.
Point
(
next_end_box
.
cx
,
next_end_box
.
cy
)
:
null
;
var
jl
=
Math
.
sqrt
(
Math
.
pow
((
start
.
x
-
end
.
x
),
2
)
+
Math
.
pow
((
start
.
y
-
end
.
y
),
2
));
//两圆中心点距离
...
...
@@ -70,6 +64,8 @@ define(function(require, exports, module) {
// 设置下一个的节点的连接线
if
(
nextNode
)
{
var
nextConnection
=
nextNode
.
getConnection
();
var
next_end_box
=
nextNode
.
getLayoutBox
();
var
next_end
=
new
kity
.
Point
(
next_end_box
.
cx
,
next_end_box
.
cy
);
var
jl2
=
Math
.
sqrt
(
Math
.
pow
((
end
.
x
-
next_end
.
x
),
2
)
+
Math
.
pow
((
end
.
y
-
next_end
.
y
),
2
));
//两圆中心点距离
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment