|
@@ -414,18 +414,18 @@ function drawText(stage, layer, paragraph, group, url, hierarchy, scalingY) {
|
|
nowtext = nowtext + '\n'
|
|
nowtext = nowtext + '\n'
|
|
allText = nowtext
|
|
allText = nowtext
|
|
}
|
|
}
|
|
|
|
+ console.log(textstyle.size, '渲染的字体大小')
|
|
var textName = new Konva.Text({
|
|
var textName = new Konva.Text({
|
|
x: 0,
|
|
x: 0,
|
|
y: 0,
|
|
y: 0,
|
|
text: allText,
|
|
text: allText,
|
|
- width: textwidth * scalingY,
|
|
|
|
|
|
+ width: textwidth * scalingY,
|
|
height: textheight * scalingY,
|
|
height: textheight * scalingY,
|
|
- padding: pds * coefficient,
|
|
|
|
|
|
+ /* padding: pds * coefficient,*/
|
|
align: paragraph.textBody.paragraphs[0].style.hori.toLowerCase(),
|
|
align: paragraph.textBody.paragraphs[0].style.hori.toLowerCase(),
|
|
verticalAlign: paragraph.textBody.paragraphs[0].style.vert === "Center" ? "middle": paragraph.textBody.paragraphs[0].style.vert.toLowerCase(),
|
|
verticalAlign: paragraph.textBody.paragraphs[0].style.vert === "Center" ? "middle": paragraph.textBody.paragraphs[0].style.vert.toLowerCase(),
|
|
/* verticalAlign: "bottom",*/
|
|
/* verticalAlign: "bottom",*/
|
|
- fontSize: paragraph.textBody.paragraphs.length !== 0 && textstyle.size != '0' ? textstyle.size * scalingY : 18,
|
|
|
|
- /* fontSize: 30,*/
|
|
|
|
|
|
+ fontSize: paragraph.textBody.paragraphs.length !== 0 && textstyle ? Number(textstyle.size * scalingY) : 18,
|
|
fontFamily: paragraph.textBody.paragraphs.length !== 0 && textstyle.family,
|
|
fontFamily: paragraph.textBody.paragraphs.length !== 0 && textstyle.family,
|
|
fill: paragraph.textBody.paragraphs.length !== 0 && textstyle.color ? textstyle.color :"#000000",
|
|
fill: paragraph.textBody.paragraphs.length !== 0 && textstyle.color ? textstyle.color :"#000000",
|
|
fontStyle: paragraph.textBody.paragraphs.length !== 0 && textstyle.bold === false ? 'normal' : 'bold',
|
|
fontStyle: paragraph.textBody.paragraphs.length !== 0 && textstyle.bold === false ? 'normal' : 'bold',
|