Release preparation, documentation, fixing vc bugs
diff --git a/dev/js/src/match/treeitem.js b/dev/js/src/match/treeitem.js
index f096861..9a4b952 100644
--- a/dev/js/src/match/treeitem.js
+++ b/dev/js/src/match/treeitem.js
@@ -4,10 +4,20 @@
*/
return {
+
+ /**
+ * Create new menu item
+ * for tree views.
+ */
create : function (params) {
return Object.create(itemClass)
.upgradeTo(this)._init(params);
},
+
+ /**
+ * Get or set the content of the
+ * menu item.
+ */
content : function (content) {
if (arguments.length === 1) {
this._content = content;
@@ -15,17 +25,23 @@
return this._content;
},
- // The foundry attribute
+ /**
+ * The foundry attribute of the menu item.
+ */
foundry : function () {
return this._foundry;
},
- // The layer attribute
+ /**
+ * The layer attribute of the menu item.
+ */
layer : function () {
return this._layer;
},
- // enter or click
+ /**
+ * Override click action of the menu item.
+ */
onclick : function (e) {
var menu = this.menu();
menu.hide();
@@ -33,7 +49,8 @@
if (menu.info() !== undefined)
menu.info().addTree(this._foundry, this._layer);
},
-
+
+ // Initialize tree menu item.
_init : function (params) {
if (params[0] === undefined)
throw new Error("Missing parameters");