remove insertNewlineStyleObject fixes, one issue per branch

This commit is contained in:
Milan Wanielik 2015-05-12 12:04:55 +02:00
parent 5259cdbb2e
commit 0d5ad0cec4
2 changed files with 1 additions and 14 deletions

View file

@ -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) {

View file

@ -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: {