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
ccac8146
Commit
ccac8146
authored
Oct 09, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix drag issue
parent
09e6a67a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
event.js
src/core/event.js
+1
-1
contextmenu.js
ui/contextmenu.js
+10
-1
No files found.
src/core/event.js
View file @
ccac8146
...
@@ -152,7 +152,7 @@ kity.extendClass(Minder, {
...
@@ -152,7 +152,7 @@ kity.extendClass(Minder, {
callbacks
[
i
].
call
(
this
,
e
);
callbacks
[
i
].
call
(
this
,
e
);
if
(
this
.
getStatus
()
!=
lastStatus
||
e
.
shouldStopPropagationImmediately
())
{
if
(
e
.
shouldStopPropagationImmediately
())
{
break
;
break
;
}
}
}
}
...
...
ui/contextmenu.js
View file @
ccac8146
...
@@ -18,6 +18,8 @@ KityMinder.registerUI('contextmenu', function(minder) {
...
@@ -18,6 +18,8 @@ KityMinder.registerUI('contextmenu', function(minder) {
.
addClass
(
'km-context-menu fui-popup-menu'
)
.
addClass
(
'km-context-menu fui-popup-menu'
)
.
appendTo
(
'#content-wrapper'
);
.
appendTo
(
'#content-wrapper'
);
var
downPosition
;
$menu
.
delegate
(
'li'
,
'mousedown'
,
function
(
e
,
info
)
{
$menu
.
delegate
(
'li'
,
'mousedown'
,
function
(
e
,
info
)
{
var
item
=
$
(
e
.
target
).
closest
(
'li'
).
data
(
'menu'
);
var
item
=
$
(
e
.
target
).
closest
(
'li'
).
data
(
'menu'
);
if
(
item
.
command
)
{
if
(
item
.
command
)
{
...
@@ -31,15 +33,22 @@ KityMinder.registerUI('contextmenu', function(minder) {
...
@@ -31,15 +33,22 @@ KityMinder.registerUI('contextmenu', function(minder) {
$
(
'#content-wrapper'
).
on
(
'mousedown'
,
function
(
e
)
{
$
(
'#content-wrapper'
).
on
(
'mousedown'
,
function
(
e
)
{
$menu
.
hide
();
$menu
.
hide
();
if
(
e
.
button
==
2
)
{
downPosition
=
[
e
.
pageX
,
e
.
pageY
].
join
(
','
);
}
else
{
downPosition
=
null
;
}
});
});
minder
.
on
(
'mouseup'
,
function
(
e
)
{
minder
.
on
(
'mouseup'
,
function
(
e
)
{
//e.preventDefault();
//e.preventDefault();
if
(
minder
.
getStatus
()
==
'hand'
||
!
e
.
isRightMB
())
return
;
if
(
!
e
.
isRightMB
())
return
;
e
=
e
.
originEvent
;
e
=
e
.
originEvent
;
if
(
downPosition
!=
[
e
.
pageX
,
e
.
pageY
].
join
(
','
))
return
;
$menu
.
empty
();
$menu
.
empty
();
var
ctxmenu
=
minder
.
getContextMenu
();
var
ctxmenu
=
minder
.
getContextMenu
();
...
...
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