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

Add zoom scale for select pannel

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