X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/45c37b7e0772059e5623e1c720d0534b6d112db1..600f0113753edfca58e20936e4701a096d2b6d04:/src/editor/modules/documentCanvas/canvas/documentElement.js diff --git a/src/editor/modules/documentCanvas/canvas/documentElement.js b/src/editor/modules/documentCanvas/canvas/documentElement.js index 859a80b..adeaafe 100644 --- a/src/editor/modules/documentCanvas/canvas/documentElement.js +++ b/src/editor/modules/documentCanvas/canvas/documentElement.js @@ -95,6 +95,7 @@ $.extend(DocumentElement.prototype, { var DocumentNodeElement = function(wlxmlNode, canvas) { DocumentElement.call(this, wlxmlNode, canvas); this.containers = []; + this.contextMenuActions = []; this.init(this.dom); }; @@ -146,6 +147,9 @@ $.extend(DocumentNodeElement.prototype, { this.containers.splice(idx, 1); } }, + addToContextMenu: function(actionFqName) { + this.contextMenuActions.push(this.canvas.createAction(actionFqName)); + }, handle: function(event) { var method = 'on' + event.type[0].toUpperCase() + event.type.substr(1), target;