@@ -389,20 +389,20 @@ ccs.CheckBox = ccs.Widget.extend(/** @lends ccs.CheckBox# */{
389389 * @param {Number } [y] The anchor point.y of UICheckBox.
390390 */
391391 setAnchorPoint : function ( point , y ) {
392- if ( arguments . length === 2 ) {
393- ccs . Widget . prototype . setAnchorPoint . call ( this , point , y ) ;
394- this . _backGroundBoxRenderer . setAnchorPoint ( point , y ) ;
395- this . _backGroundSelectedBoxRenderer . setAnchorPoint ( point , y ) ;
396- this . _backGroundBoxDisabledRenderer . setAnchorPoint ( point , y ) ;
397- this . _frontCrossRenderer . setAnchorPoint ( point , y ) ;
398- this . _frontCrossDisabledRenderer . setAnchorPoint ( point , y ) ;
392+ if ( y === undefined ) {
393+ ccs . Widget . prototype . setAnchorPoint . call ( this , point ) ;
394+ this . _backGroundBoxRenderer . setAnchorPoint ( point ) ;
395+ this . _backGroundSelectedBoxRenderer . setAnchorPoint ( point ) ;
396+ this . _backGroundBoxDisabledRenderer . setAnchorPoint ( point ) ;
397+ this . _frontCrossRenderer . setAnchorPoint ( point ) ;
398+ this . _frontCrossDisabledRenderer . setAnchorPoint ( point ) ;
399399 } else {
400- ccs . Widget . prototype . setAnchorPoint . call ( this , point ) ;
401- this . _backGroundBoxRenderer . setAnchorPoint ( point ) ;
402- this . _backGroundSelectedBoxRenderer . setAnchorPoint ( point ) ;
403- this . _backGroundBoxDisabledRenderer . setAnchorPoint ( point ) ;
404- this . _frontCrossRenderer . setAnchorPoint ( point ) ;
405- this . _frontCrossDisabledRenderer . setAnchorPoint ( point ) ;
400+ ccs . Widget . prototype . setAnchorPoint . call ( this , point , y ) ;
401+ this . _backGroundBoxRenderer . setAnchorPoint ( point , y ) ;
402+ this . _backGroundSelectedBoxRenderer . setAnchorPoint ( point , y ) ;
403+ this . _backGroundBoxDisabledRenderer . setAnchorPoint ( point , y ) ;
404+ this . _frontCrossRenderer . setAnchorPoint ( point , y ) ;
405+ this . _frontCrossDisabledRenderer . setAnchorPoint ( point , y ) ;
406406 }
407407 } ,
408408
0 commit comments