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