Add associates() method to state objects
Change-Id: Ie62455b7b73424502ac01e2534482a3db99225ff
diff --git a/dev/js/src/state.js b/dev/js/src/state.js
index 013ae10..d561a8b 100644
--- a/dev/js/src/state.js
+++ b/dev/js/src/state.js
@@ -6,6 +6,12 @@
*
* @author Nils Diewald
*/
+/*
+ * TODO:
+ * Add a "roll" parameter, like "roll":["left","right","center"]
+ * and a roll() method, that will switch through the states in the list
+ * for flexible toggling.
+ */
define(function () {
"use strict";
@@ -59,6 +65,14 @@
*/
get : function () {
return this.value;
+ },
+
+
+ /**
+ * Get the number of associated objects
+ */
+ associates : function () {
+ return this._assoc.length;
}
}
});