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
21f15934
Commit
21f15934
authored
Apr 09, 2014
by
techird
Browse files
Options
Browse Files
Download
Plain Diff
merge branch 'dev' of github.com:fex-team/kityminder into dev
parents
b30251e5
93fef115
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
3 deletions
+45
-3
kityminder.config.js
kityminder.config.js
+4
-2
minder.defaultoptions.js
src/core/minder.defaultoptions.js
+2
-1
minder.event.js
src/core/minder.event.js
+4
-0
minder.js
src/core/minder.js
+35
-0
No files found.
kityminder.config.js
View file @
21f15934
...
@@ -60,11 +60,13 @@
...
@@ -60,11 +60,13 @@
}
}
window
.
KITYMINDER_CONFIG
=
{
window
.
KITYMINDER_CONFIG
=
{
'KITYMINDER_HOME_URL'
:
getKMBasePath
()
,
'KITYMINDER_HOME_URL'
:
getKMBasePath
()
//定义工具栏
//定义工具栏
toolbars
:
[
,
toolbars
:
[
'hand zoom-in zoom-out | undo redo | bold italic | fontfamily fontsize forecolor | saveto | markers | node | switchlayout | help'
'hand zoom-in zoom-out | undo redo | bold italic | fontfamily fontsize forecolor | saveto | markers | node | switchlayout | help'
]
]
//只读模式,默认是false
//readOnly : false
//设置主题
//设置主题
//,defaultlayoutstyle : 'default' //设置默认的主题
//,defaultlayoutstyle : 'default' //设置默认的主题
...
...
src/core/minder.defaultoptions.js
View file @
21f15934
//这里只放不是由模块产生的默认参数
//这里只放不是由模块产生的默认参数
KM
.
defaultOptions
=
{
KM
.
defaultOptions
=
{
zIndex
:
1000
,
zIndex
:
1000
,
lang
:
'zh-cn'
lang
:
'zh-cn'
,
readyOnly
:
false
};
};
\ No newline at end of file
src/core/minder.event.js
View file @
21f15934
...
@@ -25,6 +25,10 @@ kity.extendClass( Minder, {
...
@@ -25,6 +25,10 @@ kity.extendClass( Minder, {
}
}
},
},
_firePharse
:
function
(
e
)
{
_firePharse
:
function
(
e
)
{
//只读模式下强了所有的事件操作
if
(
this
.
readOnly
===
true
){
return
false
;
}
var
beforeEvent
,
preEvent
,
executeEvent
;
var
beforeEvent
,
preEvent
,
executeEvent
;
if
(
e
.
type
==
'DOMMouseScroll'
)
{
if
(
e
.
type
==
'DOMMouseScroll'
)
{
...
...
src/core/minder.js
View file @
21f15934
...
@@ -10,6 +10,9 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
...
@@ -10,6 +10,9 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
this
.
_initContextmenu
();
this
.
_initContextmenu
();
this
.
_initModules
();
this
.
_initModules
();
if
(
this
.
getOptions
(
'readOnly'
)
===
true
){
this
.
setDisabled
();
}
this
.
fire
(
'ready'
);
this
.
fire
(
'ready'
);
},
},
getOptions
:
function
(
key
)
{
getOptions
:
function
(
key
)
{
...
@@ -166,6 +169,38 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
...
@@ -166,6 +169,38 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
},
},
getStatus
:
function
()
{
getStatus
:
function
()
{
return
this
.
_status
;
return
this
.
_status
;
},
setDisabled
:
function
(){
var
me
=
this
;
//禁用命令
me
.
bkqueryCommandState
=
me
.
queryCommandState
;
me
.
bkqueryCommandValue
=
me
.
queryCommandValue
;
me
.
queryCommandState
=
function
()
{
return
-
1
;
};
me
.
queryCommandValue
=
function
()
{
return
null
;
};
this
.
readOnly
=
true
;
me
.
fire
(
'interactchange'
);
},
setEnabled
:
function
(){
var
me
=
this
;
if
(
me
.
bkqueryCommandState
)
{
me
.
queryCommandState
=
me
.
bkqueryCommandState
;
delete
me
.
bkqueryCommandState
;
}
if
(
me
.
bkqueryCommandValue
)
{
me
.
queryCommandValue
=
me
.
bkqueryCommandValue
;
delete
me
.
bkqueryCommandValue
;
}
this
.
readOnly
=
false
;
me
.
fire
(
'interactchange'
);
}
}
}
);
}
);
...
...
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