--- a/client/annotviz/app/js/annotsvizview.js Thu Jan 22 15:02:54 2015 +0100
+++ b/client/annotviz/app/js/annotsvizview.js Thu Jan 22 15:03:58 2015 +0100
@@ -12,29 +12,30 @@
var DoubleRoll = require('./doubleroll.js');
var AnnotsTimeLine = require('./annotstimeline.js');
var AnnotsRoll = require('./annotsroll.js');
+var Utils = require('./utils.js');
var defaultOptions = {
xInit: 0,
yInit: 0,
width: 1024,
height: 768,
- annotCategories: [
- {
- "ts": 1421928213000,
- "colors": {
- "transgressions": "#b90000",
- "rythmique": "#af931e",
- "narration": "#4bdd71",
- "relation": "#1c28ba"
- },
- "order": [
- "transgressions",
- "rythmique",
- "narration",
- "relation"
- ],
- "defaultColor": "#536991"
- }]
+// annotCategories: [
+// {
+// "ts": 1421928213000,
+// "colors": {
+// "transgressions": "#b90000",
+// "rythmique": "#af931e",
+// "narration": "#4bdd71",
+// "relation": "#1c28ba"
+// },
+// "order": [
+// "transgressions",
+// "rythmique",
+// "narration",
+// "relation"
+// ],
+// "defaultColor": "#536991"
+// }]
};
function AnnotsVizView(options){
@@ -46,10 +47,12 @@
this.container.y = opts.yInit;
this.width = opts.width;
this.height= opts.height;
- this.annotCategories = opts.annotCategories;
this.timeBegin = opts.timeBegin;
this.timeEnd = opts.timeEnd;
-
+
+ this.annotCategories = [];
+ Utils.getAnnotCategories(opts.urlCategories, this.annotCategories);
+
var wsPianoroll = opts.wsPianoroll;
var wsAnnot = opts.wsAnnot;
var stageView = opts.stageView;