client/annotviz/app/js/utils.js
changeset 128 9f2334598088
parent 124 b5697bcdbaff
child 129 7181e1f28eb0
--- a/client/annotviz/app/js/utils.js	Fri Jan 23 00:10:09 2015 +0100
+++ b/client/annotviz/app/js/utils.js	Fri Jan 23 00:43:54 2015 +0100
@@ -40,6 +40,9 @@
             }
             var categoriesJson = session.categories_json;
             annotCat.order = categoriesJson.order;
+            if (typeof(annotCat.order['default']) === 'undefined'){
+            	annotCat.order.push('default');
+            }
 			var catList = _.clone(categoriesJson.categories);
 			while(catList.length > 0) {
 				var cat = catList.pop();
@@ -58,8 +61,6 @@
             annotCat.defaultColor = categoriesJson.defaultColor || "#536991";
             annotCategories.push(annotCat);
         });
-        console.log(annotCategories);
-        annotCategories[0].order.push("default");
     });
 
     jsonLoader.load();