Commit ed421e7b authored by 李维's avatar 李维

Bug fix

parent 43228064
......@@ -469,13 +469,9 @@ export class HotZoneImageItem extends MySprite {
defSize = s
}
}
if(type == "Text"){
this.scaleX = defSize.width / img.width
this.scaleY = defSize.height / img.height
this.setSize(img.width*this.scaleX, img.height*this.scaleY)
}else{
this.setSize(img.width*this.image.scaleX, img.height*this.image.scaleY)
}
this.setSize(img.width*this.image.scaleX, img.height*this.image.scaleY)
handleSave && handleSave()
this.lineDashFlag = true;
if(type == "Text"){
......
......@@ -17,7 +17,7 @@
Save
</button>
</div>
<h5 *ngIf="customBackground" style="border-top: 2px solid #ddd;">背景图:</h5>
<h5 *ngIf="customBackground" style="border-top: 2px solid #ddd;">选区字母图:</h5>
<div *ngIf="customBackground" style="width: 200px; margin: auto;">
<div class="bg-box">
<app-upload-image-with-preview [picUrl]="bgItem.url" (imageUploaded)="onBackgroundUploadSuccess($event)">
......
......@@ -194,9 +194,6 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
item.scaleY = (saveData.rect.height / saveData.scale) / h;
item.x = saveRect.x / saveData.scale + newRect.x
item.y = saveRect.y / saveData.scale + newRect.y
if(saveData.media.type == "Text") {
return {width: this.itemWidth, height: this.itemHeight}
}
});
item.uid = saveData.uid
item.image_url = saveData.media.image_url
......@@ -209,12 +206,10 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
item.init(this.defaultItemBG, "Text", "Text", () => {
item.x = this.canvasWidth / 2 - this.itemWidth / 2;
item.y = this.canvasHeight / 2 - 20;
return {width: this.itemWidth, height: this.itemHeight}
}, () => this.autoSave());
}
item.anchorX = 0.5;
item.anchorY = 0.5;
return item;
}
......@@ -635,7 +630,6 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
hotZoneItem['media'].text = hotZoneArr[i].text
hotZoneItem['media'].type = hotZoneArr[i].type
hotZoneItem['media'].audio_url = hotZoneArr[i].audio_url ? hotZoneArr[i].audio_url : ""
// hotZoneItem['media'].card_audio_url = hotZoneArr[i].card_audio_url ? hotZoneArr[i].card_audio_url : ""
hotZoneItemArr.push(hotZoneItem);
}
this.save.emit({ bgItem, hotZoneItemArr });
......
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