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
08f6a8dd
Commit
08f6a8dd
authored
Jul 08, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix drop test issue
parent
217e0408
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
index.html
index.html
+1
-1
dragtree.js
src/module/dragtree.js
+6
-1
No files found.
index.html
View file @
08f6a8dd
...
...
@@ -40,7 +40,7 @@
<div
id=
"kityminder"
onselectstart=
"return false"
></div>
<div
id=
"share-dialog"
>
<div
id=
"share-dialog"
>
<h3>
URL分享:
</h3>
<p>
<input
id=
"share-url"
type=
"url"
value=
"http://naotu.baidu.com/?shareId=kcev3dd"
/>
...
...
src/module/dragtree.js
View file @
08f6a8dd
...
...
@@ -300,7 +300,12 @@ var TreeDragger = kity.createClass('TreeDragger', {
function
area
(
box
)
{
return
box
.
width
*
box
.
height
;
}
return
intersectBox
&&
area
(
intersectBox
)
>
0.5
*
Math
.
min
(
area
(
sourceBox
),
area
(
targetBox
),
1
e4
);
if
(
!
intersectBox
)
return
false
;
// 面积判断
if
(
area
(
intersectBox
)
>
0.5
*
Math
.
min
(
area
(
sourceBox
),
area
(
targetBox
)))
return
true
;
if
(
intersectBox
.
width
+
1
>=
Math
.
min
(
sourceBox
.
width
,
targetBox
.
width
))
return
true
;
if
(
intersectBox
.
height
+
1
>=
Math
.
min
(
sourceBox
.
height
,
targetBox
.
height
))
return
true
;
return
false
;
});
this
.
_renderDropHint
(
this
.
_dropSucceedTarget
);
return
!!
this
.
_dropSucceedTarget
;
...
...
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