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 @@
...
@@ -4,8 +4,10 @@
<head>
<head>
<script
src=
"jquery-2.1.0.min.js"
></script>
<script
src=
"jquery-2.1.0.min.js"
></script>
<script
src=
"kity.all.js"
></script>
<script
src=
"kity.all.js"
></script>
<script
src=
"../configure.js"
></script>
<script
src=
"../dist/dev.php"
></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>
<style>
.km_receiver
{
.km_receiver
{
width
:
300px
;
height
:
300px
;
width
:
300px
;
height
:
300px
;
...
@@ -15,7 +17,7 @@
...
@@ -15,7 +17,7 @@
}
}
</style>
</style>
</head>
</head>
<body
style=
"background:#262626; margin:0; padding:0"
>
<body
>
<div
id=
"kityminder"
style=
"height:1000px;width:100%"
onselectstart=
"return false"
>
<div
id=
"kityminder"
style=
"height:1000px;width:100%"
onselectstart=
"return false"
>
<select
id=
"StyleChange"
>
<select
id=
"StyleChange"
>
<option
value=
"default"
>
Default
</option>
<option
value=
"default"
>
Default
</option>
...
@@ -24,15 +26,16 @@
...
@@ -24,15 +26,16 @@
</div>
</div>
</body>
</body>
<script>
<script>
var
minder
=
KM
.
createMinder
(
kityminder
);
KM
.
getKityMinder
(
'kityminder'
);
document
.
getElementById
(
"StyleChange"
).
addEventListener
(
"change"
,
function
(
e
){
// var minder = KM.createMinder(kityminder);
var
val
=
e
.
target
.
value
;
// document.getElementById("StyleChange").addEventListener("change",function(e){
minder
.
execCommand
(
"switchlayout"
,
val
);
// var val = e.target.value;
},
false
);
// minder.execCommand("switchlayout",val);
minder
.
select
(
minder
.
getRoot
());
// },false);
var
node
=
new
KM
.
MinderNode
(
'test'
);
// minder.select(minder.getRoot());
node
.
setData
(
'fontcolor'
,
'red'
);
// var node = new KM.MinderNode('test');
minder
.
execCommand
(
'appendChildNode'
,
node
);
// 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)]);
// 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"));
// minder.getRenderContainer().addShape(b.stroke("white"));
</script>
</script>
...
...
dist/dev.php
View file @
a9bb28c3
...
@@ -14,6 +14,8 @@ $dependency = Array(
...
@@ -14,6 +14,8 @@ $dependency = Array(
,
'src/core/minder.command.js'
,
'src/core/minder.command.js'
,
'src/core/minder.node.js'
,
'src/core/minder.node.js'
,
'src/core/keymap.js'
,
'src/core/keymap.js'
,
'src/core/minder.lang.js'
,
'src/core/minder.defaultoptions.js'
,
'src/module/history.js'
,
'src/module/history.js'
,
'src/module/icon.js'
,
'src/module/icon.js'
,
'src/module/layout.js'
,
'src/module/layout.js'
...
@@ -29,6 +31,26 @@ $dependency = Array(
...
@@ -29,6 +31,26 @@ $dependency = Array(
,
'src/module/editor.cursor.js'
,
'src/module/editor.cursor.js'
,
'src/module/basestyle.js'
,
'src/module/basestyle.js'
,
'src/module/font.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 =
...
@@ -28,7 +28,9 @@ var KityMinder =
id
=
target
.
id
||
(
"KM_INSTANCE_"
+
instanceId
++
);
id
=
target
.
id
||
(
"KM_INSTANCE_"
+
instanceId
++
);
}
}
return
instanceMap
[
id
]
||
this
.
createMinder
(
target
,
options
);
return
instanceMap
[
id
]
||
this
.
createMinder
(
target
,
options
);
}
},
//挂接多语言
LANG
:{}
}
}
}();
}();
src/core/minder.js
View file @
a9bb28c3
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
var
Minder
=
KityMinder
.
Minder
=
kity
.
createClass
(
"KityMinder"
,
{
var
Minder
=
KityMinder
.
Minder
=
kity
.
createClass
(
"KityMinder"
,
{
constructor
:
function
(
options
)
{
constructor
:
function
(
options
)
{
this
.
_options
=
Utils
.
extend
(
window
.
KITYMINDER_CONFIG
||
{},
options
);
this
.
_options
=
Utils
.
extend
(
window
.
KITYMINDER_CONFIG
||
{},
options
);
this
.
setDefaultOptions
(
KM
.
defaultOptions
);
this
.
_initEvents
();
this
.
_initEvents
();
this
.
_initMinder
();
this
.
_initMinder
();
this
.
_initSelection
();
this
.
_initSelection
();
...
@@ -29,7 +30,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
...
@@ -29,7 +30,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
}
else
{
}
else
{
obj
=
key
;
obj
=
key
;
}
}
U
tils
.
extend
(
this
.
_options
,
obj
,
true
);
u
tils
.
extend
(
this
.
_options
,
obj
,
true
);
},
},
_initMinder
:
function
()
{
_initMinder
:
function
()
{
...
...
src/module/font.js
View file @
a9bb28c3
...
@@ -3,7 +3,7 @@ KityMinder.registerModule( "fontmodule", function () {
...
@@ -3,7 +3,7 @@ KityMinder.registerModule( "fontmodule", function () {
return
{
return
{
"commands"
:
{
"commands"
:
{
"fo
nt
color"
:
kity
.
createClass
(
"fontcolorCommand"
,
{
"fo
re
color"
:
kity
.
createClass
(
"fontcolorCommand"
,
{
base
:
Command
,
base
:
Command
,
execute
:
function
(
km
,
color
)
{
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