fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
editor: canvas - context menu support
[fnpeditor.git]
/
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
(file)
--- 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 = [];
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;