Commit 4f8a1b81 authored by Chen Jiping's avatar Chen Jiping

fix:修复问题

parent 3d988248
...@@ -940,6 +940,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -940,6 +940,7 @@ export class PlayComponent implements OnInit, OnDestroy {
return; return;
} }
this.curDragItem.bg.strokeColor = this.curDragItem.lineColor;
if (!this.isMove(this.curDragItem)) { if (!this.isMove(this.curDragItem)) {
return; return;
} }
...@@ -970,7 +971,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -970,7 +971,7 @@ export class PlayComponent implements OnInit, OnDestroy {
if (!this.curDragItem) { if (!this.curDragItem) {
return; return;
} }
this.curDragItem.bg.strokeColor = this.curDragItem.lineColor;
if (!this.isMove(this.curDragItem)) { if (!this.isMove(this.curDragItem)) {
this.curAudio = this.playAudio(this.curDragItem.data.audioUrl, true); this.curAudio = this.playAudio(this.curDragItem.data.audioUrl, true);
...@@ -1033,7 +1034,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1033,7 +1034,7 @@ export class PlayComponent implements OnInit, OnDestroy {
if(this.checkClickTarget(this.bigCard.contentSpr)){ if(this.checkClickTarget(this.bigCard.contentSpr)){
if(this.curExercises){ if(this.curExercises){
this.playAudio(this.curExercises.audioUrl); this.playAudio(this.curExercises.audioUrl, true);
} }
return; return;
...@@ -1075,7 +1076,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1075,7 +1076,7 @@ export class PlayComponent implements OnInit, OnDestroy {
if (index != -1) { if (index != -1) {
this.renderArr.splice(index, 1); this.renderArr.splice(index, 1);
} }
item.bg.strokeColor = "#f26321";
this.renderArr.push(item.bg); this.renderArr.push(item.bg);
} }
...@@ -1134,7 +1135,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1134,7 +1135,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let answerSpr = this.answerSprArr[lineIndex]; let answerSpr = this.answerSprArr[lineIndex];
if(answerSpr != letterItem){ if(answerSpr.data.val != letterItem.data.val){
back(); back();
return; return;
} }
...@@ -1250,7 +1251,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1250,7 +1251,7 @@ export class PlayComponent implements OnInit, OnDestroy {
const pic = new MySprite(); const pic = new MySprite();
pic.init(this.images.get(this.curExercises.picUrl)); pic.init(this.images.get(this.curExercises.picUrl));
pic.x = this.canvasWidth / 2; pic.x = this.canvasWidth / 2;
pic.y = this.canvasHeight / 2 - 117 * this.mapScale; pic.y = this.canvasHeight / 2 - 81 * this.mapScale;
let scale = Math.min(mW / pic.width, mH / pic.height); let scale = Math.min(mW / pic.width, mH / pic.height);
pic.setScaleXY(scale); pic.setScaleXY(scale);
...@@ -1263,6 +1264,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1263,6 +1264,7 @@ export class PlayComponent implements OnInit, OnDestroy {
richText.text = this.curExercises.val; richText.text = this.curExercises.val;
richText.fontSize = 60; richText.fontSize = 60;
richText.textAlign = 'left'; richText.textAlign = 'left';
richText.disH = 10;
richText.setScaleXY(this.mapScale); richText.setScaleXY(this.mapScale);
richText.maxWidth = 1120; richText.maxWidth = 1120;
richText.refreshSize(); richText.refreshSize();
...@@ -1270,7 +1272,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1270,7 +1272,7 @@ export class PlayComponent implements OnInit, OnDestroy {
richText.y = this.canvasHeight + 150 * this.mapScale; richText.y = this.canvasHeight + 150 * this.mapScale;
this.renderArr.push(richText); this.renderArr.push(richText);
let toY = this.canvasHeight / 2 + 150 * this.mapScale; let toY = this.canvasHeight / 2 + 180 * this.mapScale;
tweenChange(richText, {y : toY}, 0.5, () =>{ tweenChange(richText, {y : toY}, 0.5, () =>{
this.canTouch = true; this.canTouch = true;
......
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