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
1643230b
Commit
1643230b
authored
Jan 03, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev
parent
47715138
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
40 deletions
+12
-40
dev.html
demo/dev.html
+1
-35
minder.module.js
src/core/minder.module.js
+3
-1
keyboard.js
src/module/keyboard.js
+1
-1
layout.js
src/module/layout.js
+6
-3
render.js
src/module/render.js
+1
-0
No files found.
demo/dev.html
View file @
1643230b
...
...
@@ -56,41 +56,7 @@
text
:
"I am the root"
,
};
minder
.
select
(
_node
);
// var _childnode = new MinderNode();
// _node.insertChild(_childnode);
// _childnode.data = {
// centerX:minderWidth/2+150,
// centerY:minderHeight/2+100,
// style:{
// radius:10,
// fill:"yellow",
// stroke:"orange",
// strokeWidth:2,
// color:"black",
// padding:[10,10,10,10],
// fontSize:12
// },
// text:"childnode1",
// };
// var _childnode2 = new MinderNode();
// _node.insertChild(_childnode2);
// _childnode2.data = {
// centerX:minderWidth/2+250,
// centerY:minderHeight/2+10,
// style:{
// radius:10,
// fill:"yellow",
// stroke:"orange",
// color:"black",
// padding:[10,10,10,10],
// fontSize:12
// },
// text:"childnode2",
// };
minder
.
execCommand
(
"rendernode"
,
_node
);
// minder.execCommand("rendernode",_childnode);
// minder.execCommand("rendernode",_childnode2);
minder
.
execCommand
(
"createchildnode"
,
_node
);
</script>
</html>
\ No newline at end of file
src/core/minder.module.js
View file @
1643230b
...
...
@@ -26,7 +26,9 @@ kity.extendClass( Minder, {
//command加入命令池子
dealCommands
=
moduleDeals
.
commands
;
Utils
.
extend
(
this
.
_commands
,
dealCommands
);
for
(
var
name
in
dealCommands
)
{
this
.
_commands
[
name
.
toLowerCase
()
]
=
dealCommands
[
name
];
}
//绑定事件
dealEvents
=
moduleDeals
.
events
;
...
...
src/module/keyboard.js
View file @
1643230b
...
...
@@ -82,7 +82,7 @@ KityMinder.registerModule( "KeyboardModule", function () {
isRootSelected
=
this
.
isNodeSelected
(
this
.
getRoot
()
);
console
.
log
(
e
.
originEvent
.
keyCode
);
e
.
originEvent
.
preventDefault
();
switch
(
e
.
keyCode
)
{
switch
(
e
.
originEvent
.
keyCode
)
{
case
13
:
// Enter
...
...
src/module/layout.js
View file @
1643230b
KityMinder
.
registerModule
(
"LayoutModule"
,
function
()
{
var
CreateChildNodeCommand
=
kity
.
createClass
(
"CreateChildNodeCommand"
,
(
function
()
{
return
{
base
:
Command
,
execute
:
function
(
km
,
parent
,
node
)
{
parent
.
insertChild
(
node
);
execute
:
function
(
km
,
parent
)
{
console
.
log
(
'create!!!'
);
var
_node
=
new
MinderNode
();
parent
.
insertChild
(
_node
);
km
.
execCommand
(
'rendernode'
,
_node
);
return
_node
;
}
}
}
)()
);
...
...
src/module/render.js
View file @
1643230b
...
...
@@ -14,6 +14,7 @@ KityMinder.registerModule( "RenderModule", function () {
};
var
renderNode
=
function
(
km
,
node
)
{
var
nodeD
=
Utils
.
extend
(
node_default
,
node
.
data
);
node
.
data
=
nodeD
;
var
_style
=
nodeD
.
style
;
var
kR
=
node
.
getRenderContainer
();
var
_node
=
node
.
shape
=
new
kity
.
Group
();
...
...
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