mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
Merge pull request #529 from VladimirTechMan/master
When setting new text on Konva.Text, treat undefined width or height as 'auto'
This commit is contained in:
commit
adcd6b9c96
@ -342,8 +342,8 @@ export class Text extends Shape {
|
||||
lineHeightPx = this.lineHeight() * fontSize,
|
||||
width = this.attrs.width,
|
||||
height = this.attrs.height,
|
||||
fixedWidth = width !== AUTO,
|
||||
fixedHeight = height !== AUTO,
|
||||
fixedWidth = width !== AUTO && width !== undefined,
|
||||
fixedHeight = height !== AUTO && height !== undefined,
|
||||
padding = this.padding(),
|
||||
maxWidth = width - padding * 2,
|
||||
maxHeightPx = height - padding * 2,
|
||||
|
Loading…
Reference in New Issue
Block a user