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
688bbc52
Commit
688bbc52
authored
Jan 03, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev
parent
780aacca
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
10 deletions
+6
-10
dev.html
demo/dev.html
+3
-5
minder.command.js
src/core/minder.command.js
+2
-1
connect.js
src/module/connect.js
+1
-3
render.js
src/module/render.js
+0
-1
No files found.
demo/dev.html
View file @
688bbc52
...
@@ -71,10 +71,8 @@
...
@@ -71,10 +71,8 @@
},
},
text
:
"node"
,
text
:
"node"
,
};
};
minder
.
execCommand
(
"rendernode"
,
_node
);
console
.
log
(
_childnode
);
console
.
log
(
minderWidth
,
minderHeight
);
minder
.
execCommand
(
"rendernode"
,
_childnode
);
minder
.
execCommand
(
"rendernode"
,
minder
,
_node
);
minder
.
execCommand
(
"rendernode"
,
minder
,
_childnode
);
</script>
</script>
</html>
</html>
\ No newline at end of file
src/core/minder.command.js
View file @
688bbc52
...
@@ -20,6 +20,7 @@ kity.extendClass( Minder, {
...
@@ -20,6 +20,7 @@ kity.extendClass( Minder, {
},
},
execCommand
:
function
(
name
)
{
execCommand
:
function
(
name
)
{
var
TargetCommand
,
command
,
cmdArgs
,
eventParams
,
stoped
,
isTopCommand
,
result
;
var
TargetCommand
,
command
,
cmdArgs
,
eventParams
,
stoped
,
isTopCommand
,
result
;
var
me
=
this
;
TargetCommand
=
this
.
_getCommand
(
name
);
TargetCommand
=
this
.
_getCommand
(
name
);
if
(
!
TargetCommand
)
{
if
(
!
TargetCommand
)
{
...
@@ -49,7 +50,7 @@ kity.extendClass( Minder, {
...
@@ -49,7 +50,7 @@ kity.extendClass( Minder, {
if
(
!
stoped
)
{
if
(
!
stoped
)
{
this
.
_fire
(
new
MinderEvent
(
"precommand"
,
eventParams
,
false
)
);
this
.
_fire
(
new
MinderEvent
(
"precommand"
,
eventParams
,
false
)
);
result
=
command
.
execute
.
apply
(
command
,
[
this
].
concat
(
cmdArgs
)
);
result
=
command
.
execute
.
apply
(
command
,
[
me
].
concat
(
cmdArgs
)
);
this
.
_fire
(
new
MinderEvent
(
"command"
,
eventParams
,
false
)
);
this
.
_fire
(
new
MinderEvent
(
"command"
,
eventParams
,
false
)
);
// 顶级命令才触发事件
// 顶级命令才触发事件
...
...
src/module/connect.js
View file @
688bbc52
...
@@ -139,13 +139,11 @@ var ConnectModule = KityMinder.registerModule( "ConnectModule", function () {
...
@@ -139,13 +139,11 @@ var ConnectModule = KityMinder.registerModule( "ConnectModule", function () {
switch
(
command
.
commandName
)
{
switch
(
command
.
commandName
)
{
case
"rendernode"
:
case
"rendernode"
:
(
function
()
{
(
function
()
{
var
minder
=
command
.
commandArgs
[
0
];
var
node
=
command
.
commandArgs
[
0
];
var
node
=
command
.
commandArgs
[
1
];
if
(
!
node
.
getParent
()
)
{
if
(
!
node
.
getParent
()
)
{
return
false
;
return
false
;
}
else
{
}
else
{
var
parent
=
node
.
getParent
();
var
parent
=
node
.
getParent
();
console
.
log
(
"parent"
,
node
.
getParent
()
);
var
_connect
=
new
ConnectBezier
(
parent
.
getRenderContainer
(),
node
.
getRenderContainer
()
);
var
_connect
=
new
ConnectBezier
(
parent
.
getRenderContainer
(),
node
.
getRenderContainer
()
);
_connect
.
stroke
(
new
kity
.
Pen
(
node
.
data
.
style
.
stroke
,
node
.
data
.
style
.
strokeWidth
)
);
_connect
.
stroke
(
new
kity
.
Pen
(
node
.
data
.
style
.
stroke
,
node
.
data
.
style
.
strokeWidth
)
);
node
.
connect
=
_connect
;
node
.
connect
=
_connect
;
...
...
src/module/render.js
View file @
688bbc52
...
@@ -38,7 +38,6 @@ KityMinder.registerModule( "RenderModule", function () {
...
@@ -38,7 +38,6 @@ KityMinder.registerModule( "RenderModule", function () {
return
{
return
{
base
:
Command
,
base
:
Command
,
execute
:
function
(
km
,
node
)
{
execute
:
function
(
km
,
node
)
{
console
.
log
(
"minderHHH"
,
km
)
renderNode
(
km
,
node
);
renderNode
(
km
,
node
);
}
}
};
};
...
...
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