Commit 1f46e160 authored by limingzhe's avatar limingzhe

fix: debug

parent a043bfbb
{"ver":"1.1.2","uuid":"3394706f-015e-4b30-b3da-f1e260ff228d","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}} {
\ No newline at end of file "ver": "1.1.2",
"uuid": "3394706f-015e-4b30-b3da-f1e260ff228d",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{
"ver": "2.3.5",
"uuid": "b703a63f-39e4-406c-abc4-511099f05da4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 10,
"height": 10,
"platformSettings": {},
"subMetas": {
"white": {
"ver": "1.0.4",
"uuid": "3a26d24e-955a-4414-8603-c77f3d08a31a",
"rawTextureUuid": "b703a63f-39e4-406c-abc4-511099f05da4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 10,
"height": 10,
"rawWidth": 10,
"rawHeight": 10,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
...@@ -198,7 +198,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -198,7 +198,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
onItemImgUploadSuccess(e, item) { onItemImgUploadSuccess(e, item) {
item.pic_url = e.url; item.pic_url = e.url;
this.loadHotZonePic(item.pic, e.url); this.loadHotZonePic(item, item.pic, e.url);
this.refresh(); this.refresh();
} }
...@@ -418,7 +418,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -418,7 +418,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
console.log('picUrl: ', picUrl); console.log('picUrl: ', picUrl);
if (picUrl) { if (picUrl) {
this.loadHotZonePic(pic, picUrl, saveData.imgScale); this.loadHotZonePic(item, pic, picUrl, saveData.imgScale);
} }
} }
...@@ -1384,7 +1384,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -1384,7 +1384,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
if (data.type == 'pic') { if (data.type == 'pic') {
let picUrl = data.pic_url; let picUrl = data.pic_url;
if (picUrl) { if (picUrl) {
this.loadHotZonePic(item.pic, picUrl); this.loadHotZonePic(item, item.pic, picUrl);
} }
} }
...@@ -1818,7 +1818,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -1818,7 +1818,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
console.log("item: ", item); console.log("item: ", item);
} }
private loadHotZonePic(pic: HotZoneImg, url, scale = null) { private loadHotZonePic(item, pic: HotZoneImg, url, scale = null) {
let baseLen; let baseLen;
if (this.hotZoneImgSize) { if (this.hotZoneImgSize) {
...@@ -1834,7 +1834,12 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges { ...@@ -1834,7 +1834,12 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
} }
} }
pic.setScaleXY(scale);
const w = item.width * item.scaleX;
const h = item.height * item.scaleY;
pic.setScaleXY(getMinScale(pic, w, h));
// pic.setScaleXY(scale);
}); });
} }
......
...@@ -282,6 +282,38 @@ ...@@ -282,6 +282,38 @@
</div> </div>
</div> </div>
<div style="margin-top: 30px;"></div>
<h2>涂色组设置:</h2>
<div style="padding: 10px; border: 2px solid #ccc; border-radius: 10px; width: 350px;">
<div *ngFor="let hzItem of item.hotZoneItemArr; let i = index">
<div *ngIf="hzItem.gIdx == '5'" style="margin: 10px; display: flex; align-items: center;">
<div style="width: 300px; height: 70px; border: 1px solid #ccc; border-radius: 10px; padding: 5px; ">
<h3>item-{{i+1}}</h3>
<span>服务端标记区域:</span>
<a nz-dropdown [nzDropdownMenu]="menu4">
{{hzItem.drawItem ? 'draw-item-' + hzItem.drawItem : 'select drawItem'}}
<i nz-icon nzType="down"></i>
</a>
<nz-dropdown-menu #menu4="nzDropdownMenu">
<ul nz-menu nzSelectable>
<div *ngFor="let temp of item.hotZoneItemArr2; let j = index" (click)="saveDrawItem(hzItem, j+1)" >
<li *ngIf="temp.gIdx == '9' " nz-menu-item>draw-item-{{j+1}}</li>
</div>
</ul>
</nz-dropdown-menu>
</div>
</div>
</div>
</div>
<div *ngIf=" item.typeArr && item.typeArr.length > 1" style="margin-top: 30px;"> <div *ngIf=" item.typeArr && item.typeArr.length > 1" style="margin-top: 30px;">
......
...@@ -181,6 +181,13 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni ...@@ -181,6 +181,13 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
] ]
} }
}, },
{
name: '涂色区域',
rect: true,
isCopy: true
// multRect : true
},
] ]
audioTypeArr = [ audioTypeArr = [
...@@ -271,6 +278,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni ...@@ -271,6 +278,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
'1' : {gIdx: '1', name: '手写'}, '1' : {gIdx: '1', name: '手写'},
'2' : {gIdx: '2', name: '画圈'}, '2' : {gIdx: '2', name: '画圈'},
'4' : {gIdx: '4', name: '符号'}, '4' : {gIdx: '4', name: '符号'},
'5' : {gIdx: '5', name: '涂色'},
'6' : {gIdx: '6', name: '书写'}, '6' : {gIdx: '6', name: '书写'},
} }
...@@ -336,7 +344,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni ...@@ -336,7 +344,10 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
this.save(); this.save();
} }
saveDrawItem(hzItem, itemId) {
hzItem.drawItem = itemId;
this.save();
}
addWrongAnswer() { addWrongAnswer() {
......
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