mirror of
https://github.com/konvajs/konva.git
synced 2026-01-08 18:54:40 +08:00
build fixes, text underline fixes
This commit is contained in:
@@ -180,14 +180,14 @@ export class Text extends Shape {
|
||||
context.save();
|
||||
context.beginPath();
|
||||
|
||||
context.moveTo(0, Math.round(lineHeightPx / 2));
|
||||
context.moveTo(0, Math.round(fontSize / 2));
|
||||
spacesNumber = text.split(' ').length - 1;
|
||||
oneWord = spacesNumber === 0;
|
||||
lineWidth =
|
||||
align === JUSTIFY && lastLine && !oneWord
|
||||
? totalWidth - padding * 2
|
||||
: width;
|
||||
context.lineTo(Math.round(lineWidth), Math.round(lineHeightPx / 2));
|
||||
context.lineTo(Math.round(lineWidth), Math.round(fontSize / 2));
|
||||
|
||||
// I have no idea what is real ratio
|
||||
// just /15 looks good enough
|
||||
|
||||
Reference in New Issue
Block a user