mirror of
https://github.com/konvajs/konva.git
synced 2025-11-18 09:07:30 +08:00
after a bit more thought, I've decided to change the maxWidth property to width, to make it even more similar to CSS sizing rules. If you set the width of the text box to a certain value, and the text string width is longer than that width, the text will be clipped
This commit is contained in:
@@ -1889,7 +1889,7 @@ Test.prototype.tests = {
|
||||
//draggable: true,
|
||||
align: 'center',
|
||||
verticalAlign: 'middle',
|
||||
maxWidth: 200
|
||||
width: 200
|
||||
});
|
||||
|
||||
layer.add(text);
|
||||
@@ -1903,7 +1903,7 @@ Test.prototype.tests = {
|
||||
test(text.getFontStyle() == 'normal', 'font style should be normal');
|
||||
text.setPadding(20);
|
||||
test(text.getPadding() === 20, 'padding should be 20');
|
||||
test(text.getMaxWidth() === 200, 'max width should be 200');
|
||||
test(text.getWidth() === 200, 'width should be 200');
|
||||
|
||||
stage.add(layer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user