Index: trunk/parsers/wikidom/lib/es/es.Surface.js |
— | — | @@ -529,6 +529,8 @@ |
530 | 530 | selection = this.selection; |
531 | 531 | } |
532 | 532 | var surface = this; |
| 533 | + var undefOffset = undefined; |
| 534 | + |
533 | 535 | if ( selection.from && selection.to ) { |
534 | 536 | selection.normalize(); |
535 | 537 | var from = selection.start, |
— | — | @@ -536,7 +538,7 @@ |
537 | 539 | if ( from.block === to.block ) { |
538 | 540 | // Single block annotation |
539 | 541 | from.block.annotateContent( annotation, from.offset, to.offset ); |
540 | | - from.block.renderContent( function() { |
| 542 | + from.block.renderContent( undefOffset, function() { |
541 | 543 | surface.drawSelection(); |
542 | 544 | } ); |
543 | 545 | } else { |
— | — | @@ -546,19 +548,19 @@ |
547 | 549 | if ( block === from.block ) { |
548 | 550 | // From offset to length |
549 | 551 | block.annotateContent( annotation, from.offset, block.getLength() ); |
550 | | - block.renderContent( function() { |
| 552 | + block.renderContent( undefOffset, function() { |
551 | 553 | surface.drawSelection(); |
552 | 554 | } ); |
553 | 555 | } else if ( block === to.block ) { |
554 | 556 | // From 0 to offset |
555 | 557 | block.annotateContent( annotation, 0, to.offset ); |
556 | | - block.renderContent( function() { |
| 558 | + block.renderContent( undefOffset, function() { |
557 | 559 | surface.drawSelection(); |
558 | 560 | } ); |
559 | 561 | } else { |
560 | 562 | // Full coverage |
561 | 563 | block.annotateContent( annotation, 0, block.getLength() ); |
562 | | - block.renderContent( function() { |
| 564 | + block.renderContent( undefOffset, function() { |
563 | 565 | surface.drawSelection(); |
564 | 566 | } ); |
565 | 567 | } |