Commit ffea3cab authored by limingzhe's avatar limingzhe

fix: debug

parent 683afb82
No preview for this file type
{"ver":"1.1.2","uuid":"4baead34-c58e-4e1a-a89c-7e70991bd208","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": "4baead34-c58e-4e1a-a89c-7e70991bd208",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
...@@ -8534,11 +8534,11 @@ cc.Class({ ...@@ -8534,11 +8534,11 @@ cc.Class({
topLabelNode.y = this.topBg.height / 2 + 5; topLabelNode.y = this.topBg.height / 2 + 5;
topLabelNode.zIndex = 99; topLabelNode.zIndex = 99;
labelText = topLabelNode.getComponent(cc.Label).string; labelText = topLabelNode.getComponent(cc.RichText).string;
console.log("labelText"+ labelText); console.log("labelText"+ labelText);
const topLabel = topLabelNode.getComponent(cc.Label); const topLabel = topLabelNode.getComponent(cc.RichText);
topLabel.enableWrapText = true; topLabel.enableWrapText = true;
} }
...@@ -9711,23 +9711,34 @@ cc.Class({ ...@@ -9711,23 +9711,34 @@ cc.Class({
fontColor = cc.Color.fromHEX(new cc.Color(), fontColorLabelData.value); fontColor = cc.Color.fromHEX(new cc.Color(), fontColorLabelData.value);
} }
// const text = inputData[key];
const labelNode = this.getLabel(text, fontSize, fontColor, fontName); // const labelNode = this.getLabel(text, fontSize, fontColor, fontName);
if (node.warp) { // if (node.warp) {
//多行 // //多行
labelNode.width = node.width; // labelNode.width = node.width;
labelNode.height = node.height; // labelNode.height = node.height;
const label = labelNode.getComponent(cc.Label); // const label = labelNode.getComponent(cc.Label);
label.overflow = cc.Label.Overflow.CLAMP; // label.overflow = cc.Label.Overflow.CLAMP;
label.enableWrapText = true; // label.enableWrapText = true;
label.horizontalAlign = cc.Label.HorizontalAlign.CENTER; // label.horizontalAlign = cc.Label.HorizontalAlign.CENTER;
label.verticalAlign = cc.Label.VerticalAlign.CENTER; // label.verticalAlign = cc.Label.VerticalAlign.CENTER;
label.lineHeight = fontSize*1.2; // label.lineHeight = fontSize*1.2;
label.string = text; // label.string = text;
console.log("多行"); // console.log("多行");
} // }
const labelNode = new cc.Node();
labelNode.color = fontColor;
const richtext = labelNode.addComponent(cc.RichText);
richtext.horizontalAlign = cc.macro.TextAlignment.CENTER;
richtext.maxWidth = node.width;
richtext.fontSize = fontSize;
richtext.lineHeight = fontSize * 1.2;
richtext.string = text;
// labelNode
const labelBoundingBox = labelNode.getBoundingBoxToWorld(); const labelBoundingBox = labelNode.getBoundingBoxToWorld();
const bgBoundingBox = node.getBoundingBoxToWorld(); const bgBoundingBox = node.getBoundingBoxToWorld();
......
This diff is collapsed.
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
</div> </div>
<div *ngIf="it.labelArr[0].value == '正确答案'"> <div *ngIf="it.labelArr[0].value == '正确答案'">
<span style="margin-left:20px;">单词 (可不填):</span> <span style="margin-left:20px;">单词 (可不填):</span>
<input type="text" nz-input [(ngModel)]="it.rightWord" (blur)="saveItemText(it, it.rightWord)" style=" width: 100px;"> <input type="text" nz-input [(ngModel)]="it.rightWord" (blur)="saveItemText(it, it.rightWord)" style=" width: 100px;">
</div> </div>
......
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