Commit 9b57a4ec authored by limingzhe's avatar limingzhe

style: 中间白板适配

parent 1a5159a2
......@@ -901,26 +901,13 @@ export class PlayComponent implements OnInit, OnDestroy {
this.juziBg = new MySprite();
this.juziBg.init(this.images.get('juzi'));
// this.juziBg.lastClickedSentenceIndex = this.canvasWidth / 2.8;
// this.juziBg.y = this.canvasHeight / 2 ;
const jx = sx / 1.8;
const jy = sy / 1.8;
const j = Math.min(jx, jy);
console.log(j + "s");
const sy2 = (this.canvasHeight - 100) / this.canvasBaseH;
const j = Math.min(sx2, sy2);
this.juziBg.setScaleXY(j);
this.juziBg.x = -100;
this.juziBg.y = 20;
this.startBorder.addChild(this.juziBg);
// this.juziBg.y=-2;
this.juziBg.x = this.canvasWidth / 2;
this.juziBg.y = this.canvasHeight / 2;
// this.juziBg.addChild(this.t1Bg);
// this.t1Bg.x = -510;
// this.t1Bg.y = -340;
//句子方块
this.juzi_bg = new ShapeRect();
this.juzi_bg.fillColor = '#ffffff';
......@@ -939,12 +926,12 @@ export class PlayComponent implements OnInit, OnDestroy {
this.playButton.init(this.images.get('start'));
this.Btn.addChild(this.playButton);
this.Btn.addChild(this.pauseButton);
this.juziBg.addChild(this.Btn);
// this.juziBg.addChild(this.Btn);
this.playButton.setScaleXY(this.mapScale);
this.pauseButton.setScaleXY(this.mapScale);
this.Btn.x = 650;
this.Btn.y = 240;
this.Btn.x = this.canvasWidth - this.playButton.width / 2 * this.playButton.scaleX - 10;
this.Btn.y = this.canvasHeight - this.playButton.height / 2 * this.playButton.scaleY - 10;
this.hide(this.pauseButton);
if (this.data.wordArr.length > 4) {
......@@ -1194,8 +1181,12 @@ export class PlayComponent implements OnInit, OnDestroy {
this.updateArr(this.renderArr);
this.updateItem(this.juziBg);
this.updateItem(this.t1Bg);
this.updateItem(this.title2);
this.updateItem(this.Btn);
}
......
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