Commit e505e742 authored by limingzhe's avatar limingzhe

style: player适配大小和位置

parent 92c31301
......@@ -510,11 +510,12 @@ export class PlayComponent implements OnInit, OnDestroy {
const pic = new MySprite();
pic.init(this.images.get(this.data.pic_url));
const scaleX = 565 / pic.width;
const scaleX = 564 / pic.width;
const scaleY = 373 / pic.height;
const scale = Math.min(scaleX, scaleY);
pic.setScaleXY(scale);
pic.x = -0.7;
pic.y = -138;
board.addChild(pic);
......@@ -710,13 +711,15 @@ export class PlayComponent implements OnInit, OnDestroy {
private initAudioPlayer() {
const audioPlayer = this.createAudioPlayer();
audioPlayer.x = 1200;
audioPlayer.y = 100;
audioPlayer.setScaleXY(this.mapScale);
audioPlayer.x = this.canvasWidth - 450 * this.mapScale;
audioPlayer.y = this.canvasHeight - 600 * this.mapScale;
this.renderArr.push(audioPlayer);
}
private createAudioPlayer() {
const audioPlayer = new MySprite();
audioPlayer.addChild(this.createPlayPauseButton());
const progressBar = this.createProgressBar();
progressBar.x = 80;
......
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