Skip to content

Commit

Permalink
refactored loadtext(), text renders again #41
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Nov 25, 2016
1 parent 3639ce5 commit 159cd9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flat/style/flat.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ function loadstructure(structureresponse) {
//referenced by other structure or other updated annotations
}

function loadtext(annotationlist) {
function loadtext(annotationresponse) {
//reload text from the annotation data response back into the DOM structure, called by update()
annotationlist.forEach(function(annotation){
if ((annotation.type == "t") && (annotation.text) && (annotation.class == "current")) {
forlatestannotations(function(annotation){
if ((annotation.type == "t") && (annotation.text) && (annotation.class == "current") && (annotation.auth)) {
if (annotation.targets) {
annotation.targets.forEach(function(target){
if (target) { $('#' + valid(target) + " span.lbl").html(annotation.text); }
Expand Down Expand Up @@ -293,8 +293,8 @@ function update(data, extracallback) {
loadstructure(returnitem.structure);
}
if (returnitem.annotations) {
loadtext(returnitem.annotations);
loadannotations(returnitem.annotations);
loadtext(returnitem.annotations);
}
if (returnitem.elementid) {
//reregister handlers
Expand Down

0 comments on commit 159cd9e

Please sign in to comment.