Commit 596e8191 authored by techird's avatar techird

根据 jshint 修改格式

1. 补充分号
2. for 循环里赋值语句显示加上括号
parent 3d817a37
......@@ -8,7 +8,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
} else {
this.setData( options );
}
this._createShapeDom()
this._createShapeDom();
},
_createShapeDom: function () {
......@@ -26,10 +26,10 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
this.rc.appendShape( g );
},
_createBgGroup: function () {
this._createGroup( 'bgrc' )
this._createGroup( 'bgrc' );
},
_createContGroup: function () {
this._createGroup( 'contrc' )
this._createGroup( 'contrc' );
},
_createTextShape: function () {
this.getContRc().appendShape( new kity.Text( this.getData( 'text' ) || '' ) );
......@@ -43,7 +43,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
return false;
}
} );
return result
return result;
},
getBgRc: function () {
var groups = this.rc.getShapesByType( 'group' ),
......@@ -54,7 +54,7 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
return false;
}
} );
return result
return result;
},
setPoint: function ( x, y ) {
this.setData( 'point', {
......@@ -234,15 +234,15 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
if ( parent ) {
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 );
}
return _tmp;
}
return function () {
return cloneNode( null, this );
}
};
}(),
equals: function ( node ) {
if ( node.children.length != this.children.length ) {
......@@ -252,7 +252,8 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
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 ) {
return false;
}
......@@ -261,9 +262,9 @@ var MinderNode = KityMinder.MinderNode = kity.createClass( "MinderNode", {
},
getTextShape: function () {
return this.getContRc().getShapesByType( 'text' )[ 0 ]
return this.getContRc().getShapesByType( 'text' )[ 0 ];
},
isSelected: function () {
return this.getData( 'highlight' ) === true
return this.getData( 'highlight' ) === true;
}
} );
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment