Commit 63aa9365 authored by 章红平's avatar 章红平

提交

parent 8f306f92
...@@ -1252,7 +1252,7 @@ ...@@ -1252,7 +1252,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
700, 800,
0, 0,
0, 0,
0, 0,
...@@ -1587,7 +1587,7 @@ ...@@ -1587,7 +1587,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
700, 800,
0, 0,
0, 0,
0, 0,
...@@ -1694,7 +1694,7 @@ ...@@ -1694,7 +1694,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
700, 800,
0, 0,
0, 0,
0, 0,
......
This diff is collapsed.
...@@ -199,6 +199,18 @@ export default class cake_class_1 extends MyCocosSceneComponent { ...@@ -199,6 +199,18 @@ export default class cake_class_1 extends MyCocosSceneComponent {
this.initData();; this.initData();;
this.initListener(); this.initListener();
} }
start(): void {
let bgNode=cc.find("bg/bg",this.node);
let scaleX=cc.winSize.width/bgNode.width;
let scaleY=cc.winSize.height /bgNode.height;
if(scaleX>scaleY){
bgNode.scale=scaleX;
}else{
bgNode.scale=scaleY;
}
super.start();
}
dataCallBack() { dataCallBack() {
super.dataCallBack(); super.dataCallBack();
this.stickers.node.active = false; this.stickers.node.active = false;
...@@ -210,6 +222,7 @@ export default class cake_class_1 extends MyCocosSceneComponent { ...@@ -210,6 +222,7 @@ export default class cake_class_1 extends MyCocosSceneComponent {
let panel = cc.instantiate(this.panel); let panel = cc.instantiate(this.panel);
panel.parent = cc.find("bg/ui", this.node) panel.parent = cc.find("bg/ui", this.node)
panel.x = panel.width * 3 / 2; panel.x = panel.width * 3 / 2;
panel.y=panel.height/2-cc.winSize.height/2
let panelS = panel.getComponent("panel") let panelS = panel.getComponent("panel")
panelS.initPanel(this.data.questions[this.questionIndex], this) panelS.initPanel(this.data.questions[this.questionIndex], this)
panelS.questionIndex = this.questionIndex; panelS.questionIndex = this.questionIndex;
......
...@@ -27,6 +27,7 @@ export class MyCocosSceneComponent extends cc.Component { ...@@ -27,6 +27,7 @@ export class MyCocosSceneComponent extends cc.Component {
let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height let screen_size = cc.view.getFrameSize().width / cc.view.getFrameSize().height
let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height let design_size = cc.Canvas.instance.designResolution.width / cc.Canvas.instance.designResolution.height
let f = screen_size >= design_size let f = screen_size >= design_size
console.log("cc.view.getFrameSize().width",cc.view.getFrameSize().width,cc.Canvas.instance.designResolution.width)
cc.Canvas.instance.fitHeight = f cc.Canvas.instance.fitHeight = f
cc.Canvas.instance.fitWidth = !f cc.Canvas.instance.fitWidth = !f
......
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
"height": 720, "height": 720,
"rawWidth": 1280, "rawWidth": 1280,
"rawHeight": 720, "rawHeight": 720,
"borderTop": 179, "borderTop": 0,
"borderBottom": 166, "borderBottom": 0,
"borderLeft": 1023, "borderLeft": 280,
"borderRight": 118, "borderRight": 280,
"subMetas": {} "subMetas": {}
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"uuid": "dbfea402-1da8-4a3f-8857-f08c75508f7c", "uuid": "dbfea402-1da8-4a3f-8857-f08c75508f7c",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "point",
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
......
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