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
a9bb28c3
Commit
a9bb28c3
authored
Feb 10, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
by zhanyi
parent
1cf019b7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
14 deletions
+42
-14
dev.html
demo/dev.html
+14
-11
dev.php
dist/dev.php
+22
-0
kityminder.js
src/core/kityminder.js
+3
-1
minder.js
src/core/minder.js
+2
-1
font.js
src/module/font.js
+1
-1
No files found.
demo/dev.html
View file @
a9bb28c3
...
...
@@ -4,8 +4,10 @@
<head>
<script
src=
"jquery-2.1.0.min.js"
></script>
<script
src=
"kity.all.js"
></script>
<script
src=
"../configure.js"
></script>
<script
src=
"../dist/dev.php"
></script>
<link
href=
"import.css"
/>
<script
src=
"../lang/zh-cn/zh-cn.js"
charset=
"utf-8"
></script>
<link
href=
"../themes/default/_css/import.css"
type=
"text/css"
rel=
"stylesheet"
>
<style>
.km_receiver
{
width
:
300px
;
height
:
300px
;
...
...
@@ -15,7 +17,7 @@
}
</style>
</head>
<body
style=
"background:#262626; margin:0; padding:0"
>
<body
>
<div
id=
"kityminder"
style=
"height:1000px;width:100%"
onselectstart=
"return false"
>
<select
id=
"StyleChange"
>
<option
value=
"default"
>
Default
</option>
...
...
@@ -24,15 +26,16 @@
</div>
</body>
<script>
var
minder
=
KM
.
createMinder
(
kityminder
);
document
.
getElementById
(
"StyleChange"
).
addEventListener
(
"change"
,
function
(
e
){
var
val
=
e
.
target
.
value
;
minder
.
execCommand
(
"switchlayout"
,
val
);
},
false
);
minder
.
select
(
minder
.
getRoot
());
var
node
=
new
KM
.
MinderNode
(
'test'
);
node
.
setData
(
'fontcolor'
,
'red'
);
minder
.
execCommand
(
'appendChildNode'
,
node
);
KM
.
getKityMinder
(
'kityminder'
);
// var minder = KM.createMinder(kityminder);
// document.getElementById("StyleChange").addEventListener("change",function(e){
// var val = e.target.value;
// minder.execCommand("switchlayout",val);
// },false);
// minder.select(minder.getRoot());
// var node = new KM.MinderNode('test');
// node.setData('fontcolor','red');
// minder.execCommand('appendChildNode',node);
// var b = new kity.Bezier([new kity.BezierPoint(0,0).setVertex(100,100),new kity.BezierPoint(100,0).setVertex(100,100)]);
// minder.getRenderContainer().addShape(b.stroke("white"));
</script>
...
...
dist/dev.php
View file @
a9bb28c3
...
...
@@ -14,6 +14,8 @@ $dependency = Array(
,
'src/core/minder.command.js'
,
'src/core/minder.node.js'
,
'src/core/keymap.js'
,
'src/core/minder.lang.js'
,
'src/core/minder.defaultoptions.js'
,
'src/module/history.js'
,
'src/module/icon.js'
,
'src/module/layout.js'
...
...
@@ -29,6 +31,26 @@ $dependency = Array(
,
'src/module/editor.cursor.js'
,
'src/module/basestyle.js'
,
'src/module/font.js'
,
'src/ui/widget.js'
,
'src/ui/button.js'
,
'src/ui/toolbar.js'
,
'src/ui/menu.js'
,
'src/ui/dropmenu.js'
,
'src/ui/splitbutton.js'
,
'src/ui/colorsplitbutton.js'
,
'src/ui/popup.js'
,
'src/ui/scale.js'
,
'src/ui/colorpicker.js'
,
'src/ui/combobox.js'
,
'src/ui/buttoncombobox.js'
,
'src/ui/modal.js'
,
'src/ui/tooltip.js'
,
'src/ui/tab.js'
,
'src/ui/separator.js'
,
'src/ui/scale.js'
,
'src/adapter/adapter.js'
,
'src/adapter/button.js'
,
'src/adapter/combobox.js'
);
...
...
src/core/kityminder.js
View file @
a9bb28c3
...
...
@@ -28,7 +28,9 @@ var KityMinder =
id
=
target
.
id
||
(
"KM_INSTANCE_"
+
instanceId
++
);
}
return
instanceMap
[
id
]
||
this
.
createMinder
(
target
,
options
);
}
},
//挂接多语言
LANG
:{}
}
}();
src/core/minder.js
View file @
a9bb28c3
...
...
@@ -11,6 +11,7 @@
var
Minder
=
KityMinder
.
Minder
=
kity
.
createClass
(
"KityMinder"
,
{
constructor
:
function
(
options
)
{
this
.
_options
=
Utils
.
extend
(
window
.
KITYMINDER_CONFIG
||
{},
options
);
this
.
setDefaultOptions
(
KM
.
defaultOptions
);
this
.
_initEvents
();
this
.
_initMinder
();
this
.
_initSelection
();
...
...
@@ -29,7 +30,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
}
else
{
obj
=
key
;
}
U
tils
.
extend
(
this
.
_options
,
obj
,
true
);
u
tils
.
extend
(
this
.
_options
,
obj
,
true
);
},
_initMinder
:
function
()
{
...
...
src/module/font.js
View file @
a9bb28c3
...
...
@@ -3,7 +3,7 @@ KityMinder.registerModule( "fontmodule", function () {
return
{
"commands"
:
{
"fo
nt
color"
:
kity
.
createClass
(
"fontcolorCommand"
,
{
"fo
re
color"
:
kity
.
createClass
(
"fontcolorCommand"
,
{
base
:
Command
,
execute
:
function
(
km
,
color
)
{
...
...
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