X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/26de8c3163f128baa02c78d172effcdf38a8adbc..1576b7c8102f5e5a5cd40512b5d22565e8f871d2:/modules/documentCanvas/canvas/documentElement.js?ds=inline diff --git a/modules/documentCanvas/canvas/documentElement.js b/modules/documentCanvas/canvas/documentElement.js index 669e06a..230e987 100644 --- a/modules/documentCanvas/canvas/documentElement.js +++ b/modules/documentCanvas/canvas/documentElement.js @@ -315,8 +315,10 @@ $.extend(DocumentTextElement.prototype, { } }, unwrap: function() { - var parent = this.parent(); + var parent = this.parent(), + toret; if(parent.children().length === 1) { + toret = parent.parent(); var grandParent = parent.parent(); if(grandParent) { var grandParentChildren = grandParent.children(), @@ -336,6 +338,7 @@ $.extend(DocumentTextElement.prototype, { parent.after(this); } parent.detach(); + return toret; } }, split: function(params) {