Commit 94ba8007 authored by limingzhe's avatar limingzhe

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

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