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
f9d6014d
Commit
f9d6014d
authored
Mar 05, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
by zhanyi
parent
785e4438
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
minder.event.js
src/core/minder.event.js
+5
-1
zoom.js
src/module/zoom.js
+14
-4
No files found.
src/core/minder.event.js
View file @
f9d6014d
...
@@ -77,10 +77,14 @@ kity.extendClass( Minder, {
...
@@ -77,10 +77,14 @@ kity.extendClass( Minder, {
if
(
callbacks
.
length
==
0
){
if
(
callbacks
.
length
==
0
){
return
;
return
;
}
}
var
lastStatus
=
this
.
getStatus
();
for
(
var
i
=
0
;
i
<
callbacks
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
callbacks
.
length
;
i
++
)
{
callbacks
[
i
].
call
(
this
,
e
);
callbacks
[
i
].
call
(
this
,
e
);
if
(
e
.
shouldStopPropagationImmediately
()
)
{
if
(
this
.
getStatus
()
!=
lastStatus
||
e
.
shouldStopPropagationImmediately
()
)
{
break
;
break
;
}
}
}
}
...
...
src/module/zoom.js
View file @
f9d6014d
...
@@ -61,11 +61,21 @@ KityMinder.registerModule( 'Zoom', function () {
...
@@ -61,11 +61,21 @@ KityMinder.registerModule( 'Zoom', function () {
'zoom-in'
:
ZoomInCommand
,
'zoom-in'
:
ZoomInCommand
,
'zoom-out'
:
ZoomOutCommand
'zoom-out'
:
ZoomOutCommand
},
},
addShortcutKeys
:
{
"zoom-in"
:
"="
,
//=
"zoom-out"
:
"-"
//-
},
events
:
{
events
:
{
'normal.keydown'
:
function
(
e
){
var
me
=
this
;
var
originEvent
=
e
.
originEvent
;
var
keyCode
=
originEvent
.
keyCode
||
originEvent
.
which
;
if
(
keymap
[
'='
]
==
keyCode
){
me
.
execCommand
(
'zoom-in'
);
}
if
(
keymap
[
'-'
]
==
keyCode
){
me
.
execCommand
(
'zoom-out'
);
}
},
'ready'
:
function
()
{
'ready'
:
function
()
{
this
.
_zoomValue
=
1
;
this
.
_zoomValue
=
1
;
},
},
...
...
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