From b6f093b37e3b4d72890f028f1d0d4285958c045e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Fri, 9 Aug 2013 14:22:59 +0200 Subject: [PATCH] Allow for wrapping current node element when there is no selection --- modules/documentCanvas/commands.js | 3 +++ 1 file changed, 3 insertions(+) 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); } -- 2.20.1