update CHANGELOG with new version

This commit is contained in:
Anton Lavrenov
2022-08-29 09:38:49 -05:00
parent 08498ab463
commit 7eef552637
5 changed files with 87 additions and 34 deletions

View File

@@ -12,7 +12,7 @@ import {
assertAlmostEqual,
} from './test-utils';
describe('Text', function () {
describe.only('Text', function () {
// ======================================================
it('text with empty config is allowed', function () {
var stage = addStage();
@@ -454,6 +454,39 @@ describe('Text', function () {
assert.equal(text.textArr[2].text.slice(-1), '…');
});
// ======================================================
it('text single line with ellipsis when there is no need in them', function () {
var stage = addStage();
var layer = new Konva.Layer();
var rect = new Konva.Rect({
x: 10,
y: 10,
width: 380,
height: 300,
fill: 'red',
});
var text = new Konva.Text({
width: 497,
height: 49,
text: 'Body text',
fill: 'black',
fontSize: 40,
shadowColor: 'black',
shadowOpacity: 1,
lineHeight: 1.2,
letterSpacing: 0,
ellipsis: true,
});
layer.add(rect).add(text);
stage.add(layer);
assert.equal(text.textArr.length, 1);
assert.equal(text.textArr[0].text.slice(-1), 't');
});
// ======================================================
it('multiline with ellipsis', function () {
var stage = addStage();