Index: trunk/parsers/wikidom/lib/es/es.TextFlow.js |
— | — | @@ -234,8 +234,9 @@ |
235 | 235 | * text, but will be automatically ignored if the text or width of the container has changed. |
236 | 236 | * |
237 | 237 | * @param offset {Integer} Offset to re-render from, if possible (not yet implemented) |
| 238 | + * @param callback {Function} Function to execute when flowing is complete |
238 | 239 | */ |
239 | | -TextFlow.prototype.render = function( offset ) { |
| 240 | +TextFlow.prototype.render = function( offset, callback ) { |
240 | 241 | // Reset lines in the DOM and the "lines" array |
241 | 242 | this.$.empty(); |
242 | 243 | |
— | — | @@ -300,6 +301,10 @@ |
301 | 302 | } |
302 | 303 | // Cleanup |
303 | 304 | $ruler.remove(); |
| 305 | + |
| 306 | + if ( $.isFunction( callback ) ) { |
| 307 | + callback(); |
| 308 | + } |
304 | 309 | }; |
305 | 310 | |
306 | 311 | /** |