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
bfd472a1
Commit
bfd472a1
authored
Apr 14, 2014
by
campaign
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
c0c0cc67
aa5fea21
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
45 deletions
+51
-45
CHANGELOG.md
CHANGELOG.md
+7
-2
kityminder.config.js
kityminder.config.js
+4
-3
basestyle.js
src/module/basestyle.js
+40
-40
No files found.
CHANGELOG.md
View file @
bfd472a1
...
@@ -2,13 +2,18 @@
...
@@ -2,13 +2,18 @@
## v1.1.2
## v1.1.2
### 功能更新
### 功能更新
1.
支持本地格式文件导入
1.
支持本地格式文件导入
*
支持文件拖拽和网盘文件导入
*
支持文件拖拽和网盘文件导入
*
格式支持xmind/freemind/mindmanager,其他格式不支持
*
格式支持 xmind/freemind/mindmanager,其他格式不支持
*
支持标签,包括优先级和任务进度
2.
新增节点移动到视野中
2.
新增节点移动到视野中
### 问题修复
### 问题修复
1.
导出png和svg图片时,文本中如果包含
字符会报错的问题
1.
导出 png 和 svg 图片时,文本中如果包含
` `
字符会报错的问题
2.
删除中心节点导致页面卡住
2.
删除中心节点导致页面卡住
## v1.1.1
## v1.1.1
...
...
kityminder.config.js
View file @
bfd472a1
...
@@ -62,11 +62,12 @@
...
@@ -62,11 +62,12 @@
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
//只读模式,默认是false
//readOnly
: fals
e
//readOnly
: tru
e
//设置主题
//设置主题
//,defaultlayoutstyle : 'default' //设置默认的主题
//,defaultlayoutstyle : 'default' //设置默认的主题
...
...
src/module/basestyle.js
View file @
bfd472a1
...
@@ -6,70 +6,70 @@ KityMinder.registerModule( "basestylemodule", function () {
...
@@ -6,70 +6,70 @@ KityMinder.registerModule( "basestylemodule", function () {
"bold"
:
kity
.
createClass
(
"boldCommand"
,
{
"bold"
:
kity
.
createClass
(
"boldCommand"
,
{
base
:
Command
,
base
:
Command
,
execute
:
function
(
)
{
execute
:
function
()
{
var
nodes
=
km
.
getSelectedNodes
();
var
nodes
=
km
.
getSelectedNodes
();
if
(
this
.
queryState
(
'bold'
)
==
1
)
{
if
(
this
.
queryState
(
'bold'
)
==
1
)
{
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
n
.
setData
(
'bold'
);
n
.
setData
(
'bold'
);
n
.
getTextShape
().
setAttr
(
'font-weight'
);
n
.
getTextShape
().
setAttr
(
'font-weight'
);
km
.
updateLayout
(
n
)
km
.
updateLayout
(
n
)
})
}
)
}
else
{
}
else
{
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
n
.
setData
(
'bold'
,
true
);
n
.
setData
(
'bold'
,
true
);
n
.
getTextShape
().
setAttr
(
'font-weight'
,
'bold'
);
n
.
getTextShape
().
setAttr
(
'font-weight'
,
'bold'
);
km
.
updateLayout
(
n
)
km
.
updateLayout
(
n
)
})
}
)
}
}
},
},
queryState
:
function
(
)
{
queryState
:
function
()
{
var
nodes
=
km
.
getSelectedNodes
(),
var
nodes
=
km
.
getSelectedNodes
(),
result
=
0
;
result
=
0
;
if
(
nodes
.
length
==
0
)
{
if
(
nodes
.
length
==
0
)
{
return
-
1
;
return
-
1
;
}
}
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
if
(
n
&&
n
.
getData
(
'bold'
)
)
{
if
(
n
&&
n
.
getData
(
'bold'
)
)
{
result
=
1
;
result
=
1
;
return
false
;
return
false
;
}
}
});
}
);
return
result
;
return
result
;
}
}
}
),
}
),
"italic"
:
kity
.
createClass
(
"italicCommand"
,
{
"italic"
:
kity
.
createClass
(
"italicCommand"
,
{
base
:
Command
,
base
:
Command
,
execute
:
function
(
)
{
execute
:
function
()
{
var
nodes
=
km
.
getSelectedNodes
();
var
nodes
=
km
.
getSelectedNodes
();
if
(
this
.
queryState
(
'italic'
)
==
1
)
{
if
(
this
.
queryState
(
'italic'
)
==
1
)
{
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
n
.
setData
(
'italic'
);
n
.
setData
(
'italic'
);
n
.
getTextShape
().
setAttr
(
'font-style'
);
n
.
getTextShape
().
setAttr
(
'font-style'
);
km
.
updateLayout
(
n
)
km
.
updateLayout
(
n
)
})
}
)
}
else
{
}
else
{
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
n
.
setData
(
'italic'
,
true
);
n
.
setData
(
'italic'
,
true
);
n
.
getTextShape
().
setAttr
(
'font-style'
,
'italic'
);
n
.
getTextShape
().
setAttr
(
'font-style'
,
'italic'
);
km
.
updateLayout
(
n
)
km
.
updateLayout
(
n
)
})
}
)
}
}
},
},
queryState
:
function
(
)
{
queryState
:
function
()
{
var
nodes
=
km
.
getSelectedNodes
(),
var
nodes
=
km
.
getSelectedNodes
(),
result
=
0
;
result
=
0
;
if
(
nodes
.
length
==
0
)
{
if
(
nodes
.
length
==
0
)
{
return
-
1
;
return
-
1
;
}
}
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
utils
.
each
(
nodes
,
function
(
i
,
n
)
{
if
(
n
&&
n
.
getData
(
'italic'
)
)
{
if
(
n
&&
n
.
getData
(
'italic'
)
)
{
result
=
1
;
result
=
1
;
return
false
;
return
false
;
}
}
});
}
);
return
result
;
return
result
;
}
}
}
)
}
)
...
@@ -81,12 +81,12 @@ KityMinder.registerModule( "basestylemodule", function () {
...
@@ -81,12 +81,12 @@ KityMinder.registerModule( "basestylemodule", function () {
"events"
:
{
"events"
:
{
"beforeRenderNode"
:
function
(
e
)
{
"beforeRenderNode"
:
function
(
e
)
{
//加粗
//加粗
if
(
e
.
node
.
getData
(
'bold'
))
{
if
(
e
.
node
.
getData
(
'bold'
)
)
{
e
.
node
.
getTextShape
().
setAttr
(
'font-weight'
,
'bold'
);
e
.
node
.
getTextShape
().
setAttr
(
'font-weight'
,
'bold'
);
}
}
if
(
e
.
node
.
getData
(
'italic'
))
{
if
(
e
.
node
.
getData
(
'italic'
)
)
{
e
.
node
.
getTextShape
().
setAttr
(
'font-style'
,
'italic'
);
e
.
node
.
getTextShape
().
setAttr
(
'font-style'
,
'italic'
);
}
}
}
}
}
}
...
...
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