mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-03-16 22:10:32 +00:00
fixed wrapped lines (#4526)
This commit is contained in:
parent
d276707e2d
commit
587d0657d6
1 changed files with 2 additions and 2 deletions
|
|
@ -647,13 +647,13 @@
|
|||
if (lineStart !== lineEnd) {
|
||||
// step1 remove the trailing of lineStart
|
||||
if (this.styles[lineStart]) {
|
||||
for (i = charStart; i < this._textLines[lineStart].length; i++) {
|
||||
for (i = charStart; i < this._unwrappedTextLines[lineStart].length; i++) {
|
||||
delete this.styles[lineStart][i];
|
||||
}
|
||||
}
|
||||
// step2 move the trailing of lineEnd to lineStart if needed
|
||||
if (this.styles[lineEnd]) {
|
||||
for (i = charEnd; i < this._textLines[lineEnd].length; i++) {
|
||||
for (i = charEnd; i < this._unwrappedTextLines[lineEnd].length; i++) {
|
||||
styleObj = this.styles[lineEnd][i];
|
||||
if (styleObj) {
|
||||
this.styles[lineStart] || (this.styles[lineStart] = { });
|
||||
|
|
|
|||
Loading…
Reference in a new issue