Commit 328f8cc7 authored by asdf's avatar asdf

answer text ui

parent a50cfa0f
...@@ -10,10 +10,11 @@ ...@@ -10,10 +10,11 @@
<input style="margin-left: 5%;width: 150px; " type="text" maxlength="" nz-input [(ngModel)]="item.questionText" <input style="margin-left: 5%;width: 150px; " type="text" maxlength="" nz-input [(ngModel)]="item.questionText"
(blur)="save()"> (blur)="save()">
<br> <br>
<div *ngFor="let question of item.questionList; let i = index"> <div *ngFor="let question of item.questionList; let i = index">
<div style="border-style: dotted; border-width: 1px;"> <div style="border-style: dotted; border-width: 1px;">
<div style="margin-left: 5%; margin-bottom: 50px; padding-top: 20px; "> <div style="margin-left: 5%; margin-bottom: 50px; padding-top: 20px; ">
<div style="height: 330px;width:100%"> <div style="height: 330px;width:100%;height:100%">
<span style="height: 30px; font-size: 18px;">第{{i + 1}}页题干:</span> <span style="height: 30px; font-size: 18px;">第{{i + 1}}页题干:</span>
<div *ngFor="let option of question.optionList; let j = index"> <div *ngFor="let option of question.optionList; let j = index">
<div style="margin-top: 20px; float: left; border-width: 1px; border-style: dotted; <div style="margin-top: 20px; float: left; border-width: 1px; border-style: dotted;
...@@ -57,7 +58,7 @@ ...@@ -57,7 +58,7 @@
</div> </div>
</div> </div>
<br> <br>
<div> <div style="margin-top: 20px;">
<button style="margin-left: 5%; margin-top: 50px;margin-bottom: 8px; width: 100px; height: 32px;" nz-button <button style="margin-left: 5%; margin-top: 50px;margin-bottom: 8px; width: 100px; height: 32px;" nz-button
nzType="danger" (click)="removeQuestion(i)"> nzType="danger" (click)="removeQuestion(i)">
删除问题 删除问题
......
...@@ -12,7 +12,7 @@ cc.Class({ ...@@ -12,7 +12,7 @@ cc.Class({
}, },
onLoad() { onLoad() {
if(this.startPos){ if (this.startPos) {
this.node.position = this.startPos; this.node.position = this.startPos;
this.node.scale = this.startScale; this.node.scale = this.startScale;
} }
...@@ -83,15 +83,15 @@ cc.Class({ ...@@ -83,15 +83,15 @@ cc.Class({
this.label.string = data.text; this.label.string = data.text;
this.labelGreen.string = data.text; this.labelGreen.string = data.text;
this.scheduleOnce(() => { this.scheduleOnce(() => {
this.labelMask.x = this.label.node.x - this.label.node.width / 2; this.labelMask.x = this.label.node.x - this.label.node.width / 2 * this.label.node.scale;
this.labelMask.y = this.label.node.y; this.labelMask.y = this.label.node.y;
}) })
this.label._forceUpdateRenderData(); this.label._forceUpdateRenderData();
if (this.label.node.width > 198) { if (this.label.node.width > 198) {
this.label.node.scale = 198 / this.label.node.width; this.label.node.scale = 198 / this.label.node.width;
this.labelMask.scale = this.label.node.scale; this.labelMask.scale = this.label.node.scale;
} }
}, },
loadDragonBone() { loadDragonBone() {
this.dragonBone.dragonAtlasAsset = null; this.dragonBone.dragonAtlasAsset = null;
...@@ -248,7 +248,7 @@ cc.Class({ ...@@ -248,7 +248,7 @@ cc.Class({
if (this.labelMask.width >= this.label.node.width) { if (this.labelMask.width >= this.label.node.width) {
this.unschedule(this.playLabelGreenCb) this.unschedule(this.playLabelGreenCb)
this.labelMask.anchorX = 1; this.labelMask.anchorX = 1;
this.labelMask.x = this.label.node.x + this.label.node.width / 2; this.labelMask.x = this.label.node.x + this.label.node.width / 2 * this.label.node.scale;
this.labelGreen.node.anchorX = 1; this.labelGreen.node.anchorX = 1;
this.labelGreen.node.x = 0; this.labelGreen.node.x = 0;
this.playLabelWhite(); this.playLabelWhite();
...@@ -262,7 +262,7 @@ cc.Class({ ...@@ -262,7 +262,7 @@ cc.Class({
if (this.labelMask.width <= 0) { if (this.labelMask.width <= 0) {
this.unschedule(this.playLabelWhiteCb) this.unschedule(this.playLabelWhiteCb)
this.labelMask.anchorX = 0; this.labelMask.anchorX = 0;
this.labelMask.x = this.label.node.x - this.label.node.width / 2; this.labelMask.x = this.label.node.x - this.label.node.width / 2 * this.label.node.scale;
this.labelGreen.node.anchorX = 0; this.labelGreen.node.anchorX = 0;
this.labelGreen.node.x = 0; this.labelGreen.node.x = 0;
} }
......
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