mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
fix ellipsis for Konva.Text
This commit is contained in:
@@ -476,6 +476,28 @@ suite('Text', function () {
|
||||
assert.equal(text.textArr[6].text.slice(-1), '…');
|
||||
});
|
||||
|
||||
// ======================================================
|
||||
test('make sure we respect false for ellipsis', function () {
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer();
|
||||
|
||||
var text = new Konva.Text({
|
||||
x: 10,
|
||||
y: 10,
|
||||
text: 'Hello foo bar',
|
||||
wrap: 'word',
|
||||
ellipsis: false,
|
||||
width: 60,
|
||||
height: 20,
|
||||
});
|
||||
|
||||
layer.add(text);
|
||||
stage.add(layer);
|
||||
|
||||
assert.equal(text.textArr.length, 1);
|
||||
assert.equal(text.textArr[0].text, 'Hello foo');
|
||||
});
|
||||
|
||||
// ======================================================
|
||||
test('text multi line with justify align', function () {
|
||||
var stage = addStage();
|
||||
|
@@ -627,7 +627,6 @@ suite('TextPath', function () {
|
||||
layer.draw();
|
||||
|
||||
var trace = layer.getContext().getTrace();
|
||||
console.log(trace);
|
||||
});
|
||||
|
||||
test('visual check for text path', function () {
|
||||
|
Reference in New Issue
Block a user