Commit 7396c13d authored by 李维's avatar 李维

添加热区别名

parent 95f61d6f
...@@ -1964,6 +1964,7 @@ export class HotZoneItem extends MySprite { ...@@ -1964,6 +1964,7 @@ export class HotZoneItem extends MySprite {
rectFillColor = '#ffffff'; rectFillColor = '#ffffff';
rectEdgeColor = '#1bfff7'; rectEdgeColor = '#1bfff7';
public itemName;
private _itemType; private _itemType;
private shapeRect: ShapeRect; private shapeRect: ShapeRect;
......
...@@ -19,9 +19,7 @@ ...@@ -19,9 +19,7 @@
</div> </div>
</div> </div>
<div nz-col nzSpan="5" nzOffset="1" class="img-box" <div nz-col nzSpan="5" nzOffset="1" class="img-box" *ngFor="let it of hotZoneArr; let i = index">
*ngFor="let it of hotZoneArr; let i = index">
<div <div
style="margin: auto; padding: 5px; margin-top: 30px; width:90%; border: 2px dashed #ddd; border-radius: 10px"> style="margin: auto; padding: 5px; margin-top: 30px; width:90%; border: 2px dashed #ddd; border-radius: 10px">
<span style="margin-left: 40%;"> item-{{i + 1}} <span style="margin-left: 40%;"> item-{{i + 1}}
...@@ -30,17 +28,21 @@ ...@@ -30,17 +28,21 @@
X X
</button> </button>
<nz-divider style="margin-top: 10px;"></nz-divider> <nz-divider style="margin: 10px 0 5px 0;"></nz-divider>
<div style="display: flex; align-items: center; justify-content: start;">
<span style="display: inline-block; width: 200px; text-align: right; white-space: nowrap;">热区名(可选): </span>
<input type="text" nz-input [(ngModel)]="it.itemName" (blur)="saveText(it)" style="margin-left: 20px;">
</div>
<div style="margin-top: -20px; margin-bottom: 5px"> <div style="margin-bottom: 5px">
<nz-radio-group [ngModel]="it.itemType" (ngModelChange)="radioChange($event, it)"> <nz-radio-group [ngModel]="it.itemType" (ngModelChange)="radioChange($event, it)">
<label *ngIf="isHasRect" nz-radio nzValue="rect">矩形</label> <label *ngIf="isHasRect" nz-radio nzValue="rect">矩形</label>
<label *ngIf="isHasPic" nz-radio nzValue="pic">图片</label> <label *ngIf="isHasPic" nz-radio nzValue="pic">图片</label>
<label *ngIf="isHasText" nz-radio nzValue="text">文本</label> <label *ngIf="isHasText" nz-radio nzValue="text">文本</label>
</nz-radio-group> </nz-radio-group>
</div> </div>
<div *ngIf="it.itemType == 'pic'"> <div *ngIf="it.itemType == 'pic'">
<app-upload-image-with-preview <app-upload-image-with-preview
[picUrl]="it?.pic_url" [picUrl]="it?.pic_url"
......
...@@ -249,6 +249,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -249,6 +249,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
item.y = this.canvasHeight / 2; item.y = this.canvasHeight / 2;
item.itemType = this.defaultItemType; item.itemType = this.defaultItemType;
item.itemName = "";
if (saveData) { if (saveData) {
...@@ -449,6 +450,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -449,6 +450,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
item.pic_url = data.pic_url; item.pic_url = data.pic_url;
item.text = data.text; item.text = data.text;
item.itemType = data.itemType; item.itemType = data.itemType;
item.itemName = data.itemName;
this.refreshItem(item); this.refreshItem(item);
console.log('item: ', item); console.log('item: ', item);
...@@ -875,6 +877,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -875,6 +877,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
text: hotZoneArr[i].text, text: hotZoneArr[i].text,
audio_url: hotZoneArr[i].audio_url, audio_url: hotZoneArr[i].audio_url,
itemType: hotZoneArr[i].itemType, itemType: hotZoneArr[i].itemType,
itemName: hotZoneArr[i].itemName,
fontSize: this.hotZoneFontObj.size, fontSize: this.hotZoneFontObj.size,
fontName: this.hotZoneFontObj.name, fontName: this.hotZoneFontObj.name,
fontColor: this.hotZoneFontObj.color, fontColor: this.hotZoneFontObj.color,
......
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