mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 01:12:42 +08:00
Merge branch 'v1.2' of github.com:cocos-creator/engine into v1.2
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -471,7 +471,7 @@
|
||||
}
|
||||
|
||||
this._texture._textureLoaded = false;
|
||||
this._texture.handleLoadedTexture();
|
||||
this._texture.handleLoadedTexture(true);
|
||||
};
|
||||
|
||||
proto._rebuildLabelSkin = function () {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user