mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-05 20:34:45 +00:00
remove insertNewlineStyleObject fixes, one issue per branch
This commit is contained in:
parent
5259cdbb2e
commit
0d5ad0cec4
2 changed files with 1 additions and 14 deletions
|
|
@ -557,13 +557,9 @@
|
|||
this.styles[lineIndex + 1] = { };
|
||||
}
|
||||
|
||||
var currentCharStyle = { },
|
||||
var currentCharStyle = this.styles[lineIndex][charIndex - 1],
|
||||
newLineStyles = { };
|
||||
|
||||
if(this.styles[lineIndex] && this.styles[lineIndex][charIndex - 1]) {
|
||||
currentCharStyle = this.styles[lineIndex][charIndex - 1];
|
||||
}
|
||||
|
||||
// if there's nothing after cursor,
|
||||
// we clone current char style onto the next (otherwise empty) line
|
||||
if (isEndOfLine) {
|
||||
|
|
|
|||
|
|
@ -274,15 +274,6 @@
|
|||
equal(iText.text, 't\nt');
|
||||
});
|
||||
|
||||
test('insertNewlineStyleObject', function() {
|
||||
var iText = new fabric.IText('test\n');
|
||||
|
||||
equal(typeof iText.insertNewlineStyleObject, 'function');
|
||||
|
||||
iText.insertNewlineStyleObject(0, 4, true);
|
||||
deepEqual(iText.styles, { '1': { '0': { } } });
|
||||
});
|
||||
|
||||
test('shiftLineStyles', function() {
|
||||
var iText = new fabric.IText('test\ntest\ntest', {
|
||||
styles: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue