Merge pull request #2364 from fusijie/fixed_scrollView_bug

fixed scrollView bug.
This commit is contained in:
pandamicro
2018-02-26 16:46:06 +08:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -2178,8 +2178,8 @@ var Node = cc.Class({
math.mat4.invert(_mat4_temp, this._worldMatrix);
let out = new cc.Vec2();
math.vec2.transformMat4(out, worldPoint, _mat4_temp);
out.x -= this._anchorPoint.x * this._contentSize.width;
out.y -= this._anchorPoint.y * this._contentSize.height;
out.x += this._anchorPoint.x * this._contentSize.width;
out.y += this._anchorPoint.y * this._contentSize.height;
return out;
},
+1
View File
@@ -139,6 +139,7 @@ var Scrollbar = cc.Class({
_setOpacity: function(opacity) {
if (this.handle) {
this.node.setOpacity(opacity);
this.handle.node.setOpacity(opacity);
}
},