Commit 3ced1a37 authored by 范雪寒's avatar 范雪寒

feat: 背景图缩放 try 4

parent 191ca976
......@@ -159,7 +159,7 @@ cc.Class({
const bg = cc.find('Canvas/ImgBg');
await this.asyncLoadSpriteByUrl(bg, this.data.bgItem.url);
bg.scale = Math.max(1, canvas.width / bg.width, canvas.height / bg.height);
bg.scale = Math.max(canvas.width / bg.width, canvas.height / bg.height);
this.itemList = [];
this.data.hotZoneItemArr.forEach(async itemData => {
......
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