Commit 94ba8007 authored by limingzhe's avatar limingzhe

fix: 输入字体大小 表单配置项

parent 8fe25eee
......@@ -36,11 +36,11 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
],
label: '比对',
},
{
name: '提交按钮',
rect: true,
isFixed: true
},
// {
// name: '提交按钮',
// rect: true,
// isFixed: true
// },
]
......
......@@ -2232,7 +2232,7 @@ export class ScrollView extends MySprite {
}
// console.log('maxW: ', maxW);
console.log('maxH: ', maxH);
// console.log('maxH: ', maxH);
// console.log('this.y: ', this.y);
// console.log(this.getBoundingBox().height);
this.content.width = maxW;
......
......@@ -657,7 +657,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this.relink();
this.gameStart();
// this.gameStart();
// this.initBtn();
......@@ -1705,7 +1705,7 @@ export class PlayComponent implements OnInit, OnDestroy {
event.preventDefault()
}
if (this.resultPanel) {
if (this.resultSv) {
this.resultSv.onTouchMove(this.mx, this.my);
return;
......@@ -1898,10 +1898,12 @@ export class PlayComponent implements OnInit, OnDestroy {
label.addMaskSpr(rect);
}
inputFontSize = 40;
emptyRectDown(targetRect) {
if (!targetRect.label) {
const label = this.getFillLabel();
label.fontSize = this.inputFontSize;
label.disH = 0;
label.offW = 0;
label.textBaseline = 'top'
......@@ -1929,31 +1931,15 @@ export class PlayComponent implements OnInit, OnDestroy {
const rect = {x, y, width, height};
const style = {
'font-size' : 56 / this.canvasScale * this.bg.scaleX + 'px',
'font-size' : this.inputFontSize / this.canvasScale * this.bg.scaleX + 'px',
'color' : '#000000',
'font-family' : 'Aileron-Bold',
'line-height' : 56 / this.canvasScale * this.bg.scaleX + 'px',
'line-height' : this.inputFontSize / this.canvasScale * this.bg.scaleX + 'px',
}
this.showInputView(style, rect, targetRect.label.text || '', (value) => {
targetRect.label.text = value;
})
return;
// emptyRect.label.visible = false;
// console.log('emptyRect.label: ', emptyRect.label);
// const label = this.getFillLabel();
// label.textAlign = 'center';
// label.text = emptyRect.label.text;
// this.renderArr.push(label);
// label['targetLabel'] = emptyRect.label;
// label['fillRect'] = emptyRect.label.fillRect;
// this.curMoveItem = label;
// this.mapMove(null)
// return;
}
}
......
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