r92082 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92081‎ | r92082 | r92083 >
Date:19:12, 13 July 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Removed queuing technique that wasn't being used.
Modified paths:
  • /trunk/parsers/wikidom/lib/es/es.ParagraphBlock.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/es/es.ParagraphBlock.js
@@ -9,8 +9,6 @@
1010 this.$ = $( '<div class="editSurface-block editSurface-paragraph"></div>' )
1111 .data( 'block', this );
1212 this.flow = new TextFlow( this.$, this.content );
13 - this.rendering = false;
14 - this.reRender = false;
1513 }
1614
1715 Block.prototype.getLength = function() {
@@ -25,7 +23,7 @@
2624 */
2725 ParagraphBlock.prototype.insertContent = function( offset, content ) {
2826 this.content.insert( offset, content );
29 - this.renderContent();
 27+ this.flow.render();
3028 };
3129
3230 /**
@@ -42,7 +40,7 @@
4341 start = tmp;
4442 }
4543 this.content.remove( start, end );
46 - this.renderContent();
 44+ this.flow.render();
4745 };
4846
4947 /**
@@ -51,20 +49,7 @@
5250 * @param $container {jQuery Selection} Container to render into
5351 */
5452 ParagraphBlock.prototype.renderContent = function() {
55 - if ( !this.rendering ) {
56 - this.rendering = true;
57 - var block = this;
58 - this.flow.render( 0, function() {
59 - block.rendering = false;
60 - var reRender = block.reRender;
61 - block.reRender = false;
62 - if ( reRender ) {
63 - block.renderContent();
64 - }
65 - });
66 - } else {
67 - this.reRender = true;
68 - }
 53+ this.flow.render();
6954 };
7055
7156 /**

Status & tagging log