From: Aleksander Ɓukasz Date: Fri, 9 Aug 2013 12:22:59 +0000 (+0200) Subject: Allow for wrapping current node element when there is no selection X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/b6f093b37e3b4d72890f028f1d0d4285958c045e Allow for wrapping current node element when there is no selection --- diff --git a/modules/documentCanvas/commands.js b/modules/documentCanvas/commands.js index 738ab76..955ba48 100644 --- a/modules/documentCanvas/commands.js +++ b/modules/documentCanvas/commands.js @@ -107,6 +107,9 @@ commands.register('newNodeRequested', function(canvas, params) { }); } } + } else if(canvas.getCurrentNodeElement()) { + var el = canvas.getCurrentNodeElement().wrapWithNodeElement({tag: params.wlxmlTag, klass: params.wlxmlClass}); + canvas.setCurrentElement(el); }