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
596e8191
Commit
596e8191
authored
Feb 12, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据 jshint 修改格式
1. 补充分号 2. for 循环里赋值语句显示加上括号
parent
3d817a37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
node.js
src/core/node.js
+12
-11
No files found.
src/core/node.js
View file @
596e8191
...
@@ -8,7 +8,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
...
@@ -8,7 +8,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
}
else
{
}
else
{
this
.
setData
(
options
);
this
.
setData
(
options
);
}
}
this
.
_createShapeDom
()
this
.
_createShapeDom
()
;
},
},
_createShapeDom
:
function
()
{
_createShapeDom
:
function
()
{
...
@@ -26,10 +26,10 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
...
@@ -26,10 +26,10 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
this
.
rc
.
appendShape
(
g
);
this
.
rc
.
appendShape
(
g
);
},
},
_createBgGroup
:
function
()
{
_createBgGroup
:
function
()
{
this
.
_createGroup
(
'bgrc'
)
this
.
_createGroup
(
'bgrc'
)
;
},
},
_createContGroup
:
function
()
{
_createContGroup
:
function
()
{
this
.
_createGroup
(
'contrc'
)
this
.
_createGroup
(
'contrc'
)
;
},
},
_createTextShape
:
function
()
{
_createTextShape
:
function
()
{
this
.
getContRc
().
appendShape
(
new
kity
.
Text
(
this
.
getData
(
'text'
)
||
''
)
);
this
.
getContRc
().
appendShape
(
new
kity
.
Text
(
this
.
getData
(
'text'
)
||
''
)
);
...
@@ -43,7 +43,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
...
@@ -43,7 +43,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
return
false
;
return
false
;
}
}
}
);
}
);
return
result
return
result
;
},
},
getBgRc
:
function
()
{
getBgRc
:
function
()
{
var
groups
=
this
.
rc
.
getShapesByType
(
'group'
),
var
groups
=
this
.
rc
.
getShapesByType
(
'group'
),
...
@@ -54,7 +54,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
...
@@ -54,7 +54,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
return
false
;
return
false
;
}
}
}
);
}
);
return
result
return
result
;
},
},
setPoint
:
function
(
x
,
y
)
{
setPoint
:
function
(
x
,
y
)
{
this
.
setData
(
'point'
,
{
this
.
setData
(
'point'
,
{
...
@@ -234,15 +234,15 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
...
@@ -234,15 +234,15 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
if
(
parent
)
{
if
(
parent
)
{
parent
.
children
.
push
(
_tmp
);
parent
.
children
.
push
(
_tmp
);
}
}
for
(
var
i
=
0
,
ci
;
ci
=
isClonedNode
.
children
[
i
++
];
)
{
for
(
var
i
=
0
,
ci
;
(
ci
=
isClonedNode
.
children
[
i
++
]
);
)
{
cloneNode
(
_tmp
,
ci
);
cloneNode
(
_tmp
,
ci
);
}
}
return
_tmp
;
return
_tmp
;
}
}
return
function
()
{
return
function
()
{
return
cloneNode
(
null
,
this
);
return
cloneNode
(
null
,
this
);
};
}
}(),
}(),
equals
:
function
(
node
)
{
equals
:
function
(
node
)
{
if
(
node
.
children
.
length
!=
this
.
children
.
length
)
{
if
(
node
.
children
.
length
!=
this
.
children
.
length
)
{
...
@@ -252,7 +252,8 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
...
@@ -252,7 +252,8 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
return
false
;
return
false
;
}
}
for
(
var
i
=
0
,
ci
;
ci
=
this
.
children
[
i
++
];
)
{
for
(
var
i
=
0
,
ci
;
(
ci
=
this
.
children
[
i
++
]
);
)
{
if
(
ci
.
equals
(
node
)
===
false
)
{
if
(
ci
.
equals
(
node
)
===
false
)
{
return
false
;
return
false
;
}
}
...
@@ -261,9 +262,9 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
...
@@ -261,9 +262,9 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
},
},
getTextShape
:
function
()
{
getTextShape
:
function
()
{
return
this
.
getContRc
().
getShapesByType
(
'text'
)[
0
]
return
this
.
getContRc
().
getShapesByType
(
'text'
)[
0
]
;
},
},
isSelected
:
function
()
{
isSelected
:
function
()
{
return
this
.
getData
(
'highlight'
)
===
true
return
this
.
getData
(
'highlight'
)
===
true
;
}
}
}
);
}
);
\ No newline at end of file
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