From: Aleksander Ɓukasz Date: Sun, 14 Jul 2013 12:03:22 +0000 (+0200) Subject: Refactoring X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/bedc5daf8a42c50c84b8c43b5924c10d07ed0b3a Refactoring --- diff --git a/modules/documentCanvas/canvas/canvas.js b/modules/documentCanvas/canvas/canvas.js index 4344730..90dac8c 100644 --- a/modules/documentCanvas/canvas/canvas.js +++ b/modules/documentCanvas/canvas/canvas.js @@ -61,9 +61,8 @@ $.extend(Canvas.prototype, { } } - var wrapper = documentElement.DocumentTextElement.create({text: this.data}); - $(this).before(wrapper.dom()); - $(this).remove(); + var element = documentElement.DocumentTextElement.create({text: this.data}); + $(this).replaceWith(element.dom()); }); this.d = wrapper.children(0);