Commit b258fe65 authored by Chen Jiping's avatar Chen Jiping

调整结束画面及色板处理

parent 1f09942a
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<nz-input-group [nzSize]="'large'"> <nz-input-group [nzSize]="'large'">
<div nz-row [nzGutter]="8"> <div nz-row [nzGutter]="8">
<div nz-col nzSpan="5"> <div nz-col nzSpan="5">
<nz-select [(ngModel)]="curPic" style="width: 110px;" id="type" nzPlaceHolder="picurte" (ngModelChange)="onChangeColor($event)"> <nz-select [(ngModel)]="curPicUrl" style="width: 110px;" id="type" nzPlaceHolder="picurte" (ngModelChange)="onChangeColor($event)">
<nz-option [nzValue]="option.picUrl" [nzLabel]="'图片-' + (i + 1) " *ngFor="let option of item.picArr;let i = index"> <nz-option [nzValue]="option.picUrl" [nzLabel]="'图片-' + (i + 1) " *ngFor="let option of item.picArr;let i = index">
</nz-option> </nz-option>
</nz-select> </nz-select>
......
...@@ -18,6 +18,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -18,6 +18,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
curPic; curPic;
curPicUrl;
color = "#f3440d"; color = "#f3440d";
colorArr = []; colorArr = [];
...@@ -212,15 +214,16 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -212,15 +214,16 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
onChangeColor(event){ onChangeColor(event){
this.curPic = null; this.curPic = null;
this.curPicUrl = null;
for(let i = 0; i < this.item.picArr.length; ++ i){ for(let i = 0; i < this.item.picArr.length; ++ i){
let pic = this.item.picArr[i]; let pic = this.item.picArr[i];
let picUrl = pic.picUrl; let picUrl = pic.picUrl;
if(event === picUrl){ if(event === picUrl){
this.curPic = this.item.picArr[i]; this.curPic = this.item.picArr[i];
this.color = pic.color; this.color = pic.color;
this.curPicUrl = picUrl;
break; break;
} }
} }
...@@ -230,6 +233,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -230,6 +233,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
if(this.curPic){ if(this.curPic){
this.curPic.color = this.color; this.curPic.color = this.color;
this.save(); this.save();
this.curPic = null;
this.curPicUrl = null;
} }
} }
} }
......
...@@ -899,5 +899,12 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -899,5 +899,12 @@ export class PlayComponent implements OnInit, OnDestroy {
//显示花瓣 //显示花瓣
petal.showPetal({ x: 0, y: 0, width: this.canvasWidth, height: this.canvasHeight }, this.mapScale, 100); petal.showPetal({ x: 0, y: 0, width: this.canvasWidth, height: this.canvasHeight }, this.mapScale, 100);
setTimeout(() => {
petal.stop(()=>{
this.canTouch = true;
})
}, 3000);
} }
} }
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