Commit 2b92978e authored by Chen Jiping's avatar Chen Jiping

fix:调整背景显示

parent 90da3152
...@@ -631,14 +631,14 @@ ...@@ -631,14 +631,14 @@
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 1,
"y": 0.5 "y": 0.5
}, },
"_trs": { "_trs": {
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
586, 640,
40, 40,
0, 0,
0, 0,
...@@ -725,14 +725,14 @@ ...@@ -725,14 +725,14 @@
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5, "x": 0,
"y": 0.5 "y": 0.5
}, },
"_trs": { "_trs": {
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-588.5, -640,
40, 40,
0, 0,
0, 0,
......
...@@ -271,16 +271,22 @@ cc.Class({ ...@@ -271,16 +271,22 @@ cc.Class({
this.getSpriteFrimeByUrl(this.data.bg.picUrl, (sf) => { this.getSpriteFrimeByUrl(this.data.bg.picUrl, (sf) => {
spr.spriteFrame = sf; spr.spriteFrame = sf;
bgNode.scale = Math.max(this._frameSize.width / bgNode.width, this._frameSize.height / bgNode.height); //bgNode.scale = Math.max(this._frameSize.width / bgNode.width, this._frameSize.height / bgNode.height);
bgNode.scaleX = this._frameSize.width / bgNode.width;
bgNode.scaleY = this._frameSize.height / bgNode.height;
}) })
} }
else { else {
cc.find('Canvas/decorate').active = true; cc.find('Canvas/decorate').active = true;
cc.find('Canvas/decorate').scale = this._mapScaleMin;
const titleBgNode = this.getSprNode('bg'); const titleBgNode = this.getSprNode('bg');
titleBgNode.parent = bgNode; titleBgNode.parent = bgNode;
bgNode.scale = Math.max(this._frameSize.width / bgNode.width, this._frameSize.height / bgNode.height); bgNode.scaleX = this._frameSize.width / bgNode.width;
bgNode.scaleY = this._frameSize.height / bgNode.height;
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment