r91296 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91295‎ | r91296 | r91297 >
Date:21:14, 1 July 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Fixed clearing order.
Modified paths:
  • /trunk/parsers/wikidom/lib/es/es.TextFlow.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/es/es.TextFlow.js
@@ -217,6 +217,9 @@
218218 * @param offset {Integer} Offset to re-render from, if possible (not yet implemented)
219219 */
220220 TextFlow.prototype.render = function( offset ) {
 221+ // Reset lines in the DOM and the "lines" array
 222+ this.$.empty();
 223+
221224 /*
222225 * Container measurement
223226 *
@@ -227,15 +230,14 @@
228231 var $ruler = $( '<div>&nbsp;</div>' ).appendTo( this.$ ),
229232 width = $ruler.innerWidth()
230233
 234+ // TODO: Take offset into account
231235 // Ignore offset optimization if the width has changed or the text has never been flowed before
232 - if (this.width !== width) {
233 - offset = undefined;
234 - }
 236+ //if (this.width !== width) {
 237+ // offset = undefined;
 238+ //}
235239
236240 // TODO: Take offset into account and only work from there
237241
238 - // Reset lines in the DOM and the "lines" array
239 - this.$.empty();
240242 this.lines = [];
241243 // Iterate over each word that will fit in a line, appending them to the DOM as we go
242244 var wordOffset = 0,

Status & tagging log