Commit 77f08c29 authored by yu's avatar yu

1

parent 2413df18
{
"ver": "1.1.0",
"uuid": "32a07afb-a7de-49ad-afa5-5151a4f801df",
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
......@@ -208,36 +208,28 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.layout_qe.removeAllChildren();
data.contentArr.forEach((dt, idx) => {
let item = dt.block ? cc.instantiate(this.item_qeR) : cc.instantiate(this.item_qeN);
let item = cc.instantiate(this.item_qeN);
item.getComponent(cc.Label).string = dt.text;
item.active = true;
// item.getComponent(cc.Label)._forceUpdateRenderData(true);
item.parent = this.layout_qe;
// this.layout_qe.getComponent(cc.Layout).updateLayout();
if (dt.block) {
let ri = cc.instantiate(this.item_qeR);
ri.parent = item;
this.wordItams.push(item);
item.getComponent(cc.Label).enabled = false;
ri.getComponent(cc.Label).string = dt.text;
ri.getComponent(cc.Label).enabled = false;
ri.active = true;
}
item.data = dt.text.split(" ").join("");;
})
// this.layout_qe.getComponent(cc.Layout).updateLayout();
// let width = this.layout_qe.width;
// if (width < 1450) {
// this.layout_qe.getComponent(cc.Layout).type = cc.Layout.Type.HORIZONTAL;
// }
// this.layout_qe.getComponent(cc.Layout).updateLayout();
this.layout_op.removeAllChildren();
data.optionList.forEach((dt, idx) => {
let item = cc.instantiate(this.item_op);
// let width = this.layout_op.width;
// item.getComponent(cc.Label)._forceUpdateRenderData(true);
// if (width > 1400) {
// this.layout_op.getComponent(cc.Layout).type = cc.Layout.Type.GRID;
// }
item.parent = this.layout_op;
// this.layout_op.getComponent(cc.Layout).updateLayout();
this.iniItem(item, dt.txt)
})
this.layout_op.getComponent(cc.Layout).updateLayout();
......@@ -327,9 +319,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
return
}
this.playLocalAudio("right");
let right_ske = cc.find("right_ske", itemBg);
let item_right = cc.find("item_right", itemBg);
item_right.getComponent(cc.Label).enabled = true;
itemBg.getComponent(cc.Label).enabled = false;
let right_ske = cc.find("right_ske", item_right);
right_ske.active = true;
target.parent = null;
target.destroy();
itemBg.getComponent(cc.Label).enabled = true;
......@@ -345,7 +342,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
private checkIsEnd() {
let count = 0;
this.wordItams.forEach((ch) => {
if (ch.getComponent(cc.Label).enabled) count++
let item_right = cc.find("item_right", ch);
if (item_right && item_right.getComponent(cc.Label).enabled) count++
})
return count >= this.wordItams.length;
}
......
......@@ -149,7 +149,7 @@
</div>
<div class="border-dashed" style="margin-top: 20px;width: 800px;">
<h2>点击文本设置空格</h2>
<h2>点击文本设置挖空项</h2>
<span *ngFor="let cont of question.contentArr; let i = index" style="margin-bottom: 5px; ">
<span style="font-size: 40px;" *ngIf="cont.block" class="option-title-line"
(click)="onBlock(cont,false)" [innerHtml]="cont.text"></span>
......
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