Index: trunk/parsers/wikidom/lib/es/es.TextFlow.js |
— | — | @@ -217,6 +217,9 @@ |
218 | 218 | * @param offset {Integer} Offset to re-render from, if possible (not yet implemented) |
219 | 219 | */ |
220 | 220 | TextFlow.prototype.render = function( offset ) { |
| 221 | + // Reset lines in the DOM and the "lines" array |
| 222 | + this.$.empty(); |
| 223 | + |
221 | 224 | /* |
222 | 225 | * Container measurement |
223 | 226 | * |
— | — | @@ -227,15 +230,14 @@ |
228 | 231 | var $ruler = $( '<div> </div>' ).appendTo( this.$ ), |
229 | 232 | width = $ruler.innerWidth() |
230 | 233 | |
| 234 | + // TODO: Take offset into account |
231 | 235 | // 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 | + //} |
235 | 239 | |
236 | 240 | // TODO: Take offset into account and only work from there |
237 | 241 | |
238 | | - // Reset lines in the DOM and the "lines" array |
239 | | - this.$.empty(); |
240 | 242 | this.lines = []; |
241 | 243 | // Iterate over each word that will fit in a line, appending them to the DOM as we go |
242 | 244 | var wordOffset = 0, |