Commit 1bf858a3 authored by 李维's avatar 李维

Add zoom scale for select pannel

parent 7d564af6
......@@ -121,6 +121,7 @@ export class PlayComponent implements OnInit, OnDestroy {
wordAll = [];
currentClickNode = null;
zoom = 0.9;
setWordLoad(id: string, letterId:string, loaded:boolean, letter: Label):void{
......@@ -523,13 +524,11 @@ export class PlayComponent implements OnInit, OnDestroy {
});
this.rawAudios.forEach((value, key) => {// 预加载音频
const a = this.preloadAudio(value)
.then(() => {
// this.images.set(key, img);
})
.catch(err => console.log(err));
pr.push(a);
});
return Promise.all(pr);
......@@ -763,9 +762,9 @@ export class PlayComponent implements OnInit, OnDestroy {
initPic() {
this.body_bg = new ShapeRoundRect();
// this.body_bg.setSize(1280*this.mapScale, 555*this.mapScale, 30*this.mapScale) ;
this.body_bg.setScaleXY(this.mapScale)
this.body_bg.x = this.canvasWidth / 2 - 610 * this.mapScale // (this.canvasWidth - this.body_bg.width) / 2; // - 100 * this.mapScale;
this.body_bg.y = this.canvasHeight / 2 - 250 * this.mapScale // this.canvasHeight - this.body_bg.height - (this.canvasHeight - this.body_bg.height)/3 ;
this.body_bg.setScaleXY(this.mapScale * this.zoom)
this.body_bg.x = this.canvasWidth / 2 - 610 * this.mapScale * this.zoom // (this.canvasWidth - this.body_bg.width) / 2; // - 100 * this.mapScale;
this.body_bg.y = this.canvasHeight / 2 - 250 * this.mapScale * this.zoom// this.canvasHeight - this.body_bg.height - (this.canvasHeight - this.body_bg.height)/3 ;
this.renderArr.push(this.body_bg);
let colorBlock_left = new ShapeRoundRect()
......
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