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
be6918f9
Commit
be6918f9
authored
Apr 23, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added event step
parent
211403ac
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
120 additions
and
18 deletions
+120
-18
icon.js
src/module/icon.js
+2
-1
layout.bottom.js
src/module/layout.bottom.js
+62
-9
layout.default.js
src/module/layout.default.js
+56
-8
No files found.
src/module/icon.js
View file @
be6918f9
...
...
@@ -90,7 +90,8 @@ KityMinder.registerModule( "IconModule", function () {
"progress"
:
setProgressCommand
},
"events"
:
{
"RenderNode"
:
function
(
e
)
{
"RenderNodeLeft"
:
function
(
e
)
{
//alert( '1111111' );
var
node
=
e
.
node
;
var
iconRc
=
node
.
getIconRc
();
var
contRc
=
node
.
getContRc
();
...
...
src/module/layout.bottom.js
View file @
be6918f9
...
...
@@ -348,21 +348,50 @@ KityMinder.registerModule( "LayoutBottom", function () {
default
:
break
;
}
this
.
_fire
(
new
MinderEvent
(
"beforeRenderNode"
,
{
// this._fire( new MinderEvent( "beforeRenderNode", {
// node: node
// }, false ) );
// this._fire( new MinderEvent( "RenderNode", {
// node: node
// }, false ) );
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
node
:
node
},
false
)
);
this
.
_fire
(
new
MinderEvent
(
"RenderNode"
,
{
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeCenter"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeRight"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeBottom"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeTop"
,
{
node
:
node
},
false
)
);
},
updateLayout
:
function
(
node
)
{
this
.
_fire
(
new
MinderEvent
(
"beforeRenderNode"
,
{
// this._fire( new MinderEvent( "beforeRenderNode", {
// node: node
// }, false ) );
// this._fire( new MinderEvent( "RenderNode", {
// node: node
// }, false ) );
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
node
:
node
},
false
)
);
this
.
_fire
(
new
MinderEvent
(
"RenderNode"
,
{
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeCenter"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeRight"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeBottom"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeTop"
,
{
node
:
node
},
false
)
);
updateShapeByCont
(
node
);
var
set
=
updateLayoutAll
(
node
,
node
.
getParent
(),
"change"
);
for
(
var
i
=
0
;
i
<
set
.
length
;
i
++
)
{
...
...
@@ -384,10 +413,19 @@ KityMinder.registerModule( "LayoutBottom", function () {
_root
.
getLayout
().
align
=
"center"
;
updateBg
(
_root
);
initLayout
(
_root
);
this
.
_fire
(
new
MinderEvent
(
"beforeRenderNode
"
,
{
this
.
_fire
Pharse
(
new
MinderEvent
(
"RenderNodeLeft
"
,
{
node
:
_root
},
false
)
);
this
.
_fire
(
new
MinderEvent
(
"RenderNode"
,
{
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeCenter"
,
{
node
:
_root
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeRight"
,
{
node
:
_root
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeBottom"
,
{
node
:
_root
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeTop"
,
{
node
:
_root
},
false
)
);
updateShapeByCont
(
_root
);
...
...
@@ -434,10 +472,25 @@ KityMinder.registerModule( "LayoutBottom", function () {
//计算位置等流程
updateBg
(
node
);
initLayout
(
node
);
this
.
_fire
(
new
MinderEvent
(
"beforeRenderNode"
,
{
// this._fire( new MinderEvent( "beforeRenderNode", {
// node: node
// }, false ) );
// this._fire( new MinderEvent( "RenderNode", {
// node: node
// }, false ) );
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeCenter"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeRight"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeBottom"
,
{
node
:
node
},
false
)
);
this
.
_fire
(
new
MinderEvent
(
"RenderNode
"
,
{
this
.
_fire
Pharse
(
new
MinderEvent
(
"RenderNodeTop
"
,
{
node
:
node
},
false
)
);
updateShapeByCont
(
node
);
...
...
src/module/layout.default.js
View file @
be6918f9
...
...
@@ -435,18 +435,36 @@ KityMinder.registerModule( "LayoutDefault", function () {
default
:
break
;
}
this
.
_fire
(
new
MinderEvent
(
"beforeRenderNode
"
,
{
this
.
_fire
Pharse
(
new
MinderEvent
(
"RenderNodeLeft
"
,
{
node
:
node
},
false
)
);
this
.
_fire
(
new
MinderEvent
(
"RenderNode"
,
{
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeCenter"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeRight"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeBottom"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeTop"
,
{
node
:
node
},
false
)
);
},
updateLayout
:
function
(
node
)
{
this
.
_fire
(
new
MinderEvent
(
"beforeRenderNode"
,
{
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeCenter"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeRight"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeBottom"
,
{
node
:
node
},
false
)
);
this
.
_fire
(
new
MinderEvent
(
"RenderNode
"
,
{
this
.
_fire
Pharse
(
new
MinderEvent
(
"RenderNodeTop
"
,
{
node
:
node
},
false
)
);
...
...
@@ -468,10 +486,25 @@ KityMinder.registerModule( "LayoutDefault", function () {
_root
.
getLayout
().
align
=
"center"
;
updateBg
(
_root
);
initLayout
(
_root
);
this
.
_fire
(
new
MinderEvent
(
"beforeRenderNode"
,
{
// this._fire( new MinderEvent( "beforeRenderNode", {
// node: _root
// }, false ) );
// this._fire( new MinderEvent( "RenderNode", {
// node: _root
// }, false ) );
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
node
:
_root
},
false
)
);
this
.
_fire
(
new
MinderEvent
(
"RenderNode"
,
{
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeCenter"
,
{
node
:
_root
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeRight"
,
{
node
:
_root
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeBottom"
,
{
node
:
_root
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeTop"
,
{
node
:
_root
},
false
)
);
updateShapeByCont
(
_root
);
...
...
@@ -570,10 +603,25 @@ KityMinder.registerModule( "LayoutDefault", function () {
//计算位置等流程
updateBg
(
node
);
initLayout
(
node
);
this
.
_fire
(
new
MinderEvent
(
"beforeRenderNode"
,
{
// this._fire( new MinderEvent( "beforeRenderNode", {
// node: node
// }, false ) );
// this._fire( new MinderEvent( "RenderNode", {
// node: node
// }, false ) );
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeLeft"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeCenter"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeRight"
,
{
node
:
node
},
false
)
);
this
.
_firePharse
(
new
MinderEvent
(
"RenderNodeBottom"
,
{
node
:
node
},
false
)
);
this
.
_fire
(
new
MinderEvent
(
"RenderNode
"
,
{
this
.
_fire
Pharse
(
new
MinderEvent
(
"RenderNodeTop
"
,
{
node
:
node
},
false
)
);
updateShapeByCont
(
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