Commit 485e2042 authored by Chen Jiping's avatar Chen Jiping

fix:需求变更

parent d7a5a9b0
......@@ -95,7 +95,7 @@
<div class="save-box">
<button class="save-btn" nz-button nzType="primary" [nzSize]="'large'" nzShape="round"
<button class="save-btn" nz-button nzType="primary" [nzSize]="'large'" nzShape="round" [disabled]="saveDisabled ? true : false"
(click)="saveClick()" >
<i nz-icon nzType="save"></i>
Save
......
......@@ -71,7 +71,6 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
images = new Map();
animationId: any;
// 资源
// rawImages = new Map(res);
winResizeEventStream = new Subject();
......@@ -142,15 +141,18 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
console.log('e: ', e);
this.bgItem.picUrl = e.url;
this.refreshBackground();
this.saveDisabled = false;
}
onItemImgUploadSuccess(e, item) {
item.pic_url = e.url;
this.loadHotZonePic(item.pic, e.url);
this.saveDisabled = false;
}
onItemAudioUploadSuccess(e, item) {
item.audio_url = e.url;
this.saveDisabled = false;
}
......@@ -195,6 +197,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this.refreshHotZoneId();
this.saveDisabled = false;
}
deleteBtnClick(index) {
......@@ -205,11 +208,14 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this.refreshHotZoneId();
this.saveDisabled = false;
}
onImgUploadSuccessByImg(e, img) {
img.pic_url = e.url;
this.refreshImage(img);
this.saveDisabled = false;
}
refreshImage(img) {
......@@ -348,6 +354,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
onAudioUploadSuccessByImg(e, img) {
img.audio_url = e.url;
this.saveDisabled = false;
}
deleteItem(e, i) {
......@@ -356,6 +363,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this.hotZoneArr.splice(i, 1);
this.refreshHotZoneId();
this.saveDisabled = false;
}
......@@ -364,7 +372,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this.refreshItem(item);
// console.log(' in radioChange e: ', e);
this.saveDisabled = false;
}
refreshItem(item) {
......@@ -600,7 +608,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
this.oldPos = {x: this.mx, y: this.my};
this.saveDisabled = true;
this.saveDisabled = false;
}
......@@ -919,6 +927,8 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
}
this.save.emit({bgItem, hotZoneItemArr, exercises});
this.saveDisabled = true;
}
private updatePos() {
......@@ -998,6 +1008,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
saveText(item) {
item.textLabel.text = item.text;
this.saveDisabled = false;
}
private loadHotZonePic(pic: HotZoneImg, url) {
......
......@@ -981,8 +981,11 @@ export class PlayComponent implements OnInit, OnDestroy {
this.curAudio = this.playAudio(this.curHotZoneItem.data.audio_url, true, () => {
this.curIndex++;
this.showNext();
setTimeout(()=>{
this.curIndex++;
this.showNext();
}, 3000);
});
}
......@@ -1065,16 +1068,14 @@ export class PlayComponent implements OnInit, OnDestroy {
else {
this.magnifier['wrong'].visible = true;
this.canTouch = false;
this.playAudio('wrong', true);
this.canTouch = true;
this.playAudio('try_again', true);
shake(this.magnifier, 0.5, () => {
//加载下一个
this.curIndex++;
this.showNext();
})
}
}
this.isMagnifierTouched = false;
......
......@@ -48,6 +48,7 @@ const resAudio = [
['right', "assets/play/music/right.mp3"],
['find', "assets/play/music/find.mp3"],
['wrong', "assets/play/music/wrong.mp3"],
['try_again', "assets/play/music/try_again.mp3"],
];
export {res, resAudio};
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