mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
Added support for text strikethrough
This commit is contained in:
@@ -463,7 +463,7 @@ suite('Text', function(){
|
||||
// ======================================================
|
||||
// skiping this test for now. It fails on travis. WHYYY??!?!?!
|
||||
// TODO: restore it
|
||||
test.skip('text multi line with textDecoration and spacing', function() {
|
||||
test.skip('text multi line with underline and spacing', function() {
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer();
|
||||
|
||||
@@ -488,6 +488,46 @@ suite('Text', function(){
|
||||
|
||||
});
|
||||
|
||||
test('text multi line with strike', function() {
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer();
|
||||
|
||||
var text = new Konva.Text({
|
||||
x: 10,
|
||||
y: 10,
|
||||
text: 'hello\nworld',
|
||||
fontSize: 80,
|
||||
fill: 'red',
|
||||
textDecoration: 'line-through'
|
||||
});
|
||||
|
||||
layer.add(text);
|
||||
stage.add(layer);
|
||||
|
||||
// TODO
|
||||
// assert.equal(layer.getContext().getTrace(), trace);
|
||||
});
|
||||
|
||||
test('text multi line with underline and strike', function() {
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer();
|
||||
|
||||
var text = new Konva.Text({
|
||||
x: 10,
|
||||
y: 10,
|
||||
text: 'hello\nworld',
|
||||
fontSize: 80,
|
||||
fill: 'red',
|
||||
textDecoration: 'underline line-through'
|
||||
});
|
||||
|
||||
layer.add(text);
|
||||
stage.add(layer);
|
||||
|
||||
// TODO
|
||||
// assert.equal(layer.getContext().getTrace(), trace);
|
||||
});
|
||||
|
||||
// ======================================================
|
||||
test('change font size should update text data', function() {
|
||||
var stage = addStage();
|
||||
|
Reference in New Issue
Block a user