var html = "";
for (var i = 0; i < ann.length; i++) {
var name = nameAnnotation(ann[i]);
- html += "<span id='" + name + "'>"
- html += name + ": " + (ann[i].shortText || '(icon)')
+ html += "<span id='" + name + "'>";
+ html += name + ": " + (ann[i].shortText || '(icon)');
html += " -> " + ann[i].text + "</span><br/>";
}
document.getElementById("list").innerHTML = html;
- }
- }
+ }
+ }
);
-
+
var last_ann = 0;
annotations = [];
for (var x = 10; x < 15; x += 2) {
}
} );
g.setAnnotations(annotations);
-
+
document.getElementById('add').onclick = function() {
var x = last_ann + 2;
var annnotations = g.annotations();
} );
last_ann = x;
g.setAnnotations(annotations);
- }
+ };
var bottom = document.getElementById('bottom');
bottom.onclick = function() {
var to_bottom = bottom.textContent == 'Shove to bottom';
-
+
var anns = g.annotations();
for (var i = 0; i < anns.length; i++) {
anns[i].attachAtBottom = to_bottom;
}
g.setAnnotations(anns);
-
+
if (to_bottom) {
bottom.textContent = 'Lift back up';
} else {
bottom.textContent = 'Shove to bottom';
}
- }
-
+ };
+
var saveBg = '';
var num = 0;
g.updateOptions( {