diff --git a/cocos2d/core/components/CCScrollView.js b/cocos2d/core/components/CCScrollView.js index 7080b0da58..762fc7f1db 100644 --- a/cocos2d/core/components/CCScrollView.js +++ b/cocos2d/core/components/CCScrollView.js @@ -1324,8 +1324,22 @@ var ScrollView = cc.Class({ } }, + _adjustContentOutOfBoundary: function () { + this._outOfBoundaryAmountDirty = true; + if(this._isOutOfBoundary()) { + var outOfBoundary = this._getHowMuchOutOfBoundary(cc.p(0, 0)); + var newPosition = cc.pAdd(this.getContentPosition(), outOfBoundary); + if(this.content) { + this.content.setPosition(newPosition); + } + } + }, + start: function() { this._calculateBoundary(); + //Because widget component will adjust content position and scrollview position is correct after visit + //So this event could make sure the content is on the correct position after loading. + cc.director.once(cc.Director.EVENT_AFTER_VISIT, this._adjustContentOutOfBoundary, this); }, onDestroy: function() { diff --git a/cocos2d/core/label/CCSGLabelCanvasRenderCmd.js b/cocos2d/core/label/CCSGLabelCanvasRenderCmd.js index 9bcba7236f..370f696a09 100644 --- a/cocos2d/core/label/CCSGLabelCanvasRenderCmd.js +++ b/cocos2d/core/label/CCSGLabelCanvasRenderCmd.js @@ -471,7 +471,7 @@ } this._texture._textureLoaded = false; - this._texture.handleLoadedTexture(); + this._texture.handleLoadedTexture(true); }; proto._rebuildLabelSkin = function () { diff --git a/cocos2d/core/label/CCSGLabelWebGLRenderCmd.js b/cocos2d/core/label/CCSGLabelWebGLRenderCmd.js index a3f54123c0..541e2f3c11 100644 --- a/cocos2d/core/label/CCSGLabelWebGLRenderCmd.js +++ b/cocos2d/core/label/CCSGLabelWebGLRenderCmd.js @@ -105,7 +105,10 @@ proto.uploadData = function (f32buffer, ui32buffer, vertexDataOffset) { // Fill in vertex data with quad information (4 vertices for sprite) // Use 255 because color has been set when baking label - this._color[0] = ((this._displayedOpacity<<24) | (255<<16) | (255<<8) | 255); + // premultiplied alpha is used for labelTTF and system font + var opacity = this._displayedOpacity; + this._color[0] = ((opacity<<24) | (opacity<<16) | (opacity<<8) | opacity); + var z = node._vertexZ; var vertices = this._vertices;