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
d052d531
Commit
d052d531
authored
Feb 24, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
by zhanyi
parent
e02893e6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
1 deletion
+38
-1
dev.php
dist/dev.php
+1
-0
minder.event.js
src/core/minder.event.js
+1
-1
minder.js
src/core/minder.js
+16
-0
minder.module.js
src/core/minder.module.js
+4
-0
layout.js
src/module/layout.js
+15
-0
import.css
themes/default/_css/import.css
+1
-0
No files found.
dist/dev.php
View file @
d052d531
...
@@ -64,6 +64,7 @@ $dependency = Array(
...
@@ -64,6 +64,7 @@ $dependency = Array(
,
'src/adapter/tooltips.js'
,
'src/adapter/tooltips.js'
,
'src/adapter/layout.js'
,
'src/adapter/layout.js'
,
'src/adapter/node.js'
,
'src/adapter/node.js'
,
'src/adapter/contextmenu.js'
,
'src/protocal/plain.js'
,
'src/protocal/plain.js'
,
'src/protocal/json.js'
,
'src/protocal/json.js'
,
'src/protocal/png.js'
,
'src/protocal/png.js'
...
...
src/core/minder.event.js
View file @
d052d531
...
@@ -13,7 +13,7 @@ kity.extendClass( Minder, {
...
@@ -13,7 +13,7 @@ kity.extendClass( Minder, {
},
},
// TODO: mousemove lazy bind
// TODO: mousemove lazy bind
_bindPaperEvents
:
function
()
{
_bindPaperEvents
:
function
()
{
this
.
_paper
.
on
(
'click dblclick mousedown mouseup mousemove mousewheel touchstart touchmove touchend'
,
this
.
_firePharse
.
bind
(
this
)
);
this
.
_paper
.
on
(
'click dblclick mousedown
contextmenu
mouseup mousemove mousewheel touchstart touchmove touchend'
,
this
.
_firePharse
.
bind
(
this
)
);
if
(
window
)
{
if
(
window
)
{
window
.
addEventListener
(
'resize'
,
this
.
_firePharse
.
bind
(
this
)
);
window
.
addEventListener
(
'resize'
,
this
.
_firePharse
.
bind
(
this
)
);
}
}
...
...
src/core/minder.js
View file @
d052d531
...
@@ -16,6 +16,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
...
@@ -16,6 +16,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
this
.
_initMinder
();
this
.
_initMinder
();
this
.
_initSelection
();
this
.
_initSelection
();
this
.
_initShortcutKey
();
this
.
_initShortcutKey
();
this
.
_initContextmenu
();
this
.
_initModules
();
this
.
_initModules
();
this
.
fire
(
'ready'
);
this
.
fire
(
'ready'
);
...
@@ -138,6 +139,21 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
...
@@ -138,6 +139,21 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
}
}
}
);
}
);
},
_initContextmenu
:
function
(){
this
.
contextmenus
=
[];
},
addContextmenu
:
function
(
item
){
if
(
utils
.
isArray
(
item
)){
this
.
contextmenus
=
this
.
contextmenus
.
concat
(
item
);
}
else
{
this
.
contextmenus
.
push
(
item
);
}
return
this
;
},
getContextmenu
:
function
(){
return
this
.
contextmenus
;
}
}
}
);
}
);
...
...
src/core/minder.module.js
View file @
d052d531
...
@@ -46,6 +46,10 @@ kity.extendClass( Minder, {
...
@@ -46,6 +46,10 @@ kity.extendClass( Minder, {
this
.
addShortcutKeys
(
moduleDeals
.
addShortcutKeys
)
this
.
addShortcutKeys
(
moduleDeals
.
addShortcutKeys
)
}
}
//添加邮件菜单
if
(
moduleDeals
.
contextmenu
){
this
.
addContextmenu
(
moduleDeals
.
contextmenu
)
}
}
}
},
},
...
...
src/module/layout.js
View file @
d052d531
...
@@ -202,6 +202,21 @@ KityMinder.registerModule( "LayoutModule", function () {
...
@@ -202,6 +202,21 @@ KityMinder.registerModule( "LayoutModule", function () {
this
.
initStyle
(
this
.
getRoot
()
);
this
.
initStyle
(
this
.
getRoot
()
);
}
}
},
},
'contextmenu'
:[
{
label
:
this
.
getLang
(
'node.appendsiblingnode'
),
cmdName
:
'appendsiblingnode'
},
{
label
:
this
.
getLang
(
'node.appendchildnode'
),
cmdName
:
'appendchildnode'
},
{
label
:
this
.
getLang
(
'node.removenode'
),
cmdName
:
'removenode'
}
],
"defaultOptions"
:
{
"defaultOptions"
:
{
"defaultlayoutstyle"
:
"default"
,
"defaultlayoutstyle"
:
"default"
,
"node"
:
{
"node"
:
{
...
...
themes/default/_css/import.css
View file @
d052d531
...
@@ -12,3 +12,4 @@
...
@@ -12,3 +12,4 @@
@import
"colorpicker.css"
;
@import
"colorpicker.css"
;
@import
"separator.css"
;
@import
"separator.css"
;
@import
"markers.css"
;
@import
"markers.css"
;
@import
"dropmenu.css"
;
\ No newline at end of file
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