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
fbb1b81e
Commit
fbb1b81e
authored
Jul 02, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复孤立node节点容错
parent
c0f3895f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
0 deletions
+8
-0
minder.node.js
src/core/minder.node.js
+2
-0
node.js
src/core/node.js
+1
-0
render.js
src/core/render.js
+3
-0
history.js
src/module/history.js
+2
-0
No files found.
src/core/minder.node.js
View file @
fbb1b81e
...
...
@@ -40,6 +40,7 @@ kity.extendClass(Minder, {
handelNodeCreate
:
function
(
node
)
{
var
rc
=
this
.
_rc
;
node
.
traverse
(
function
(
current
)
{
current
.
attached
=
true
;
rc
.
addShape
(
current
.
getRenderContainer
());
});
rc
.
addShape
(
node
.
getRenderContainer
());
...
...
@@ -48,6 +49,7 @@ kity.extendClass(Minder, {
handelNodeRemove
:
function
(
node
)
{
var
rc
=
this
.
_rc
;
node
.
traverse
(
function
(
current
)
{
current
.
attached
=
false
;
rc
.
removeShape
(
current
.
getRenderContainer
());
});
},
...
...
src/core/node.js
View file @
fbb1b81e
...
...
@@ -185,6 +185,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass('MinderNode', {
if
(
index
>=
0
)
{
removed
=
this
.
children
.
splice
(
index
,
1
)[
0
];
removed
.
parent
=
null
;
removed
.
root
=
removed
;
}
},
...
...
src/core/render.js
View file @
fbb1b81e
...
...
@@ -27,6 +27,7 @@ var Renderer = KityMinder.Renderer = kity.createClass('Renderer', {
kity
.
extendClass
(
Minder
,
{
_createRendererForNode
:
function
(
node
)
{
var
registered
=
this
.
_renderers
;
var
renderers
=
[];
...
...
@@ -48,6 +49,7 @@ kity.extendClass(Minder, {
},
renderNode
:
function
(
node
)
{
var
rendererClasses
=
this
.
_renderers
;
var
g
=
KityMinder
.
Geometry
;
var
i
,
latestBox
,
renderer
;
...
...
@@ -107,6 +109,7 @@ kity.extendClass(Minder, {
kity
.
extendClass
(
MinderNode
,
{
render
:
function
()
{
if
(
!
this
.
attached
)
return
;
this
.
getMinder
().
renderNode
(
this
);
return
this
;
},
...
...
src/module/history.js
View file @
fbb1b81e
...
...
@@ -123,7 +123,9 @@ KityMinder.registerModule("HistoryModule", function() {
traverseNode
(
km
.
getRoot
(),
target
);
km
.
layout
();
km
.
select
(
selectedNodes
,
true
);
selectedNodes
=
[];
},
...
...
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