Commit 1351afb0 authored by Chen Jiping's avatar Chen Jiping

解决皮肤A长背景显示问题

parent 4d16d8d3
...@@ -722,22 +722,23 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -722,22 +722,23 @@ export class PlayComponent implements OnInit, OnDestroy {
let midLen = this.data.exercisesArr.length / 2; let midLen = this.data.exercisesArr.length / 2;
let lBgArr = [];
//如果是A皮肤,则增加长的背景信息 //如果是A皮肤,则增加长的背景信息
if (this.data.skin === 'A') { if (this.data.skin === 'A') {
let starty = startY;
for (let i = 0; i < 3; ++i) { for (let i = 0; i < 3; ++i) {
const lBg = new ShapeRectNew(); const lBg = new ShapeRectNew();
lBg.fillColor = "#E5E3E4"; lBg.fillColor = "#E5E3E4";
lBg.x = startX; lBg.x = startX;
lBg.y = starty;
lBg.setSize(1100 * this.mapScale, 80 * this.mapScale, 40 * this.mapScale); lBg.setSize(1100 * this.mapScale, 80 * this.mapScale, 40 * this.mapScale);
this.skinRenderArr.push(lBg); this.skinRenderArr.push(lBg);
lBgArr.push(lBg);
starty = starty + 80 * this.mapScale + 78 * this.mapScaleY;
} }
} }
let startYArr = [];
startYArr.push(startY);
for (let i = 0; i < this.data.exercisesArr.length; ++i) { for (let i = 0; i < this.data.exercisesArr.length; ++i) {
let index = i + 1; let index = i + 1;
...@@ -768,7 +769,9 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -768,7 +769,9 @@ export class PlayComponent implements OnInit, OnDestroy {
} }
//到下一行增加高度 //到下一行增加高度
startY = tempStartY startY = tempStartY;
} }
else { else {
if (this.data.skin === 'A') { if (this.data.skin === 'A') {
...@@ -778,15 +781,20 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -778,15 +781,20 @@ export class PlayComponent implements OnInit, OnDestroy {
startY = startY + exercises.bg.height + 65 * this.mapScaleY; startY = startY + exercises.bg.height + 65 * this.mapScaleY;
} }
startYArr.push(startY);
} }
this.renderArr.push(exercises.bg); this.renderArr.push(exercises.bg);
this.bigCardRenderArr.push(exercises.cardBg); this.bigCardRenderArr.push(exercises.cardBg);
} }
console.log(startYArr);
for(let i = 0; i < lBgArr.length; ++ i){
lBgArr[i].y = startYArr[i];
}
let minScale = 1; let minScale = 1;
//获取最小字体 //获取最小字体
......
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