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

添加热区别名

parent 95f61d6f
......@@ -1964,6 +1964,7 @@ export class HotZoneItem extends MySprite {
rectFillColor = '#ffffff';
rectEdgeColor = '#1bfff7';
public itemName;
private _itemType;
private shapeRect: ShapeRect;
......
......@@ -19,9 +19,7 @@
</div>
</div>
<div nz-col nzSpan="5" nzOffset="1" class="img-box"
*ngFor="let it of hotZoneArr; let i = index">
<div nz-col nzSpan="5" nzOffset="1" class="img-box" *ngFor="let it of hotZoneArr; let i = index">
<div
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}}
......@@ -30,17 +28,21 @@
X
</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)">
<label *ngIf="isHasRect" nz-radio nzValue="rect">矩形</label>
<label *ngIf="isHasPic" nz-radio nzValue="pic">图片</label>
<label *ngIf="isHasText" nz-radio nzValue="text">文本</label>
</nz-radio-group>
</div>
<div *ngIf="it.itemType == 'pic'">
<app-upload-image-with-preview
[picUrl]="it?.pic_url"
......
......@@ -249,6 +249,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
item.y = this.canvasHeight / 2;
item.itemType = this.defaultItemType;
item.itemName = "";
if (saveData) {
......@@ -449,6 +450,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
item.pic_url = data.pic_url;
item.text = data.text;
item.itemType = data.itemType;
item.itemName = data.itemName;
this.refreshItem(item);
console.log('item: ', item);
......@@ -875,6 +877,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
text: hotZoneArr[i].text,
audio_url: hotZoneArr[i].audio_url,
itemType: hotZoneArr[i].itemType,
itemName: hotZoneArr[i].itemName,
fontSize: this.hotZoneFontObj.size,
fontName: this.hotZoneFontObj.name,
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