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", { ...@@ -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
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