editor: canvas - context menu support
[fnpeditor.git] / src / editor / modules / documentCanvas / canvas / documentElement.js
index 859a80b..adeaafe 100644 (file)
@@ -95,6 +95,7 @@ $.extend(DocumentElement.prototype, {
 var DocumentNodeElement = function(wlxmlNode, canvas) {
     DocumentElement.call(this, wlxmlNode, canvas);
     this.containers = [];
 var DocumentNodeElement = function(wlxmlNode, canvas) {
     DocumentElement.call(this, wlxmlNode, canvas);
     this.containers = [];
+    this.contextMenuActions = [];
     this.init(this.dom);
 };
 
     this.init(this.dom);
 };
 
@@ -146,6 +147,9 @@ $.extend(DocumentNodeElement.prototype, {
             this.containers.splice(idx, 1);
         }
     },
             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;
     handle: function(event) {
         var method = 'on' + event.type[0].toUpperCase() + event.type.substr(1),
             target;