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
217e0408
Commit
217e0408
authored
Jul 08, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix drop test bug
parent
726ee5bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
dragtree.js
src/module/dragtree.js
+4
-4
keyboard.js
src/module/keyboard.js
+2
-2
No files found.
src/module/dragtree.js
View file @
217e0408
...
@@ -300,7 +300,7 @@ var TreeDragger = kity.createClass('TreeDragger', {
...
@@ -300,7 +300,7 @@ var TreeDragger = kity.createClass('TreeDragger', {
function
area
(
box
)
{
function
area
(
box
)
{
return
box
.
width
*
box
.
height
;
return
box
.
width
*
box
.
height
;
}
}
return
intersectBox
&&
area
(
intersectBox
)
>
0.5
*
Math
.
min
(
area
(
sourceBox
),
area
(
targetBox
));
return
intersectBox
&&
area
(
intersectBox
)
>
0.5
*
Math
.
min
(
area
(
sourceBox
),
area
(
targetBox
)
,
1
e4
);
});
});
this
.
_renderDropHint
(
this
.
_dropSucceedTarget
);
this
.
_renderDropHint
(
this
.
_dropSucceedTarget
);
return
!!
this
.
_dropSucceedTarget
;
return
!!
this
.
_dropSucceedTarget
;
...
@@ -321,7 +321,7 @@ var TreeDragger = kity.createClass('TreeDragger', {
...
@@ -321,7 +321,7 @@ var TreeDragger = kity.createClass('TreeDragger', {
_renderOrderHint
:
function
(
hint
)
{
_renderOrderHint
:
function
(
hint
)
{
this
.
_orderHinter
.
render
(
hint
);
this
.
_orderHinter
.
render
(
hint
);
},
},
preventDragMove
:
function
()
{
preventDragMove
:
function
()
{
this
.
_startPosition
=
null
;
this
.
_startPosition
=
null
;
}
}
});
});
...
@@ -349,8 +349,8 @@ KityMinder.registerModule('DragTree', function() {
...
@@ -349,8 +349,8 @@ KityMinder.registerModule('DragTree', function() {
e
.
stopPropagation
();
e
.
stopPropagation
();
this
.
fire
(
'contentchange'
);
this
.
fire
(
'contentchange'
);
},
},
'statuschange'
:
function
(
e
)
{
'statuschange'
:
function
(
e
)
{
if
(
e
.
lastStatus
==
'textedit'
&&
e
.
currentStatus
==
'normal'
)
{
if
(
e
.
lastStatus
==
'textedit'
&&
e
.
currentStatus
==
'normal'
)
{
dragger
.
preventDragMove
();
dragger
.
preventDragMove
();
}
}
}
}
...
...
src/module/keyboard.js
View file @
217e0408
...
@@ -183,8 +183,8 @@ KityMinder.registerModule("KeyboardModule", function() {
...
@@ -183,8 +183,8 @@ KityMinder.registerModule("KeyboardModule", function() {
}
}
},
},
'normal.keyup'
:
function
(
e
)
{
'normal.keyup'
:
function
(
e
)
{
if
(
browser
.
ipad
)
{
if
(
browser
.
ipad
)
{
var
keys
=
KityMinder
.
keymap
;
var
keys
=
KityMinder
.
keymap
;
var
node
=
e
.
getTargetNode
();
var
node
=
e
.
getTargetNode
();
var
lang
=
this
.
getLang
();
var
lang
=
this
.
getLang
();
...
...
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