mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-03 03:24:42 +00:00
remove shiftLineStyles fixes, one issue per branch
This commit is contained in:
parent
5259cdbb2e
commit
b3c57385f2
2 changed files with 0 additions and 39 deletions
|
|
@ -672,9 +672,6 @@
|
|||
var numericLine = parseInt(line, 10);
|
||||
if (numericLine > lineIndex) {
|
||||
this.styles[numericLine + offset] = clonedStyles[numericLine];
|
||||
if(!clonedStyles[numericLine - offset]) {
|
||||
delete this.styles[numericLine];
|
||||
}
|
||||
}
|
||||
}
|
||||
//TODO: evaluate if delete old style lines with offset -1
|
||||
|
|
|
|||
|
|
@ -283,42 +283,6 @@
|
|||
deepEqual(iText.styles, { '1': { '0': { } } });
|
||||
});
|
||||
|
||||
test('shiftLineStyles', function() {
|
||||
var iText = new fabric.IText('test\ntest\ntest', {
|
||||
styles: {
|
||||
'1': {
|
||||
'0': { 'fill': 'red' },
|
||||
'1': { 'fill': 'red' },
|
||||
'2': { 'fill': 'red' },
|
||||
'3': { 'fill': 'red' }
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
equal(typeof iText.shiftLineStyles, 'function');
|
||||
|
||||
iText.shiftLineStyles(0, +1);
|
||||
deepEqual(iText.styles, {
|
||||
'2': {
|
||||
'0': { 'fill': 'red' },
|
||||
'1': { 'fill': 'red' },
|
||||
'2': { 'fill': 'red' },
|
||||
'3': { 'fill': 'red' }
|
||||
}
|
||||
});
|
||||
|
||||
iText.shiftLineStyles(0, -1);
|
||||
deepEqual(iText.styles, {
|
||||
'1': {
|
||||
'0': { 'fill': 'red' },
|
||||
'1': { 'fill': 'red' },
|
||||
'2': { 'fill': 'red' },
|
||||
'3': { 'fill': 'red' }
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
test('selectWord', function() {
|
||||
var iText = new fabric.IText('test foo bar-baz\nqux');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue