@@ -53,7 +53,7 @@ ccui.ImageView = ccui.Widget.extend(/** @lends ccui.ImageView# */{
5353 this . _imageTextureSize = cc . size ( this . _capInsets . width , this . _capInsets . height ) ;
5454 ccui . Widget . prototype . ctor . call ( this ) ;
5555 texType = texType === undefined ? 0 : texType ;
56- this . init ( imageFileName , texType ) ;
56+ this . _init ( imageFileName , texType ) ;
5757 } ,
5858
5959 /**
@@ -62,15 +62,11 @@ ccui.ImageView = ccui.Widget.extend(/** @lends ccui.ImageView# */{
6262 * @param {Number } [texType==ccui.Widget.LOCAL_TEXTURE]
6363 * @returns {boolean }
6464 */
65- init : function ( imageFileName , texType ) {
66- if ( ccui . Widget . prototype . init . call ( this ) ) {
67- if ( imageFileName === undefined )
68- this . _imageTexType = ccui . Widget . LOCAL_TEXTURE ;
69- else
70- this . loadTexture ( imageFileName , texType ) ;
71- return true ;
72- }
73- return false ;
65+ _init : function ( imageFileName , texType ) {
66+ if ( imageFileName === undefined )
67+ this . _imageTexType = ccui . Widget . LOCAL_TEXTURE ;
68+ else
69+ this . loadTexture ( imageFileName , texType ) ;
7470 } ,
7571
7672 _initRenderer : function ( ) {
@@ -330,4 +326,4 @@ ccui.ImageView.create = function (imageFileName, texType) {
330326 * @constant
331327 * @type {number }
332328 */
333- ccui . ImageView . RENDERER_ZORDER = - 1 ;
329+ ccui . ImageView . RENDERER_ZORDER = - 1 ;
0 commit comments