Skip to content

Commit

Permalink
Implemented support for visualisation of phonetic content in viewer (#89
Browse files Browse the repository at this point in the history
)
  • Loading branch information
proycon committed Nov 25, 2016
1 parent 1821fa2 commit 4f9e6a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flat/style/flat.viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ function renderannotation(annotation, norecurse) {
//renders the annotation in the details popup
var s = "";
var i;
if (!((annotation.type == "t") && (annotation.class == "current"))) {
if (!(((annotation.type == "t") || (annotation.type == "ph")) && (annotation.class == "current"))) {
if ((setdefinitions[annotation.set]) && (setdefinitions[annotation.set].type != "open") && (setdefinitions[annotation.set].classes[annotation.class]) ) {
s = s + "<span class=\"class\">" + setdefinitions[annotation.set].classes[annotation.class].label + "</span>";
} else if (annotation.class) {
Expand All @@ -494,6 +494,9 @@ function renderannotation(annotation, norecurse) {
if (annotation.type == "t") {
if (annotation.class != "current") s = s + "<br />";
s = s + "<span class=\"text\">" + annotation.text + "</span>";
} else if (annotation.type == "ph") {
if (annotation.class != "current") s = s + "<br />";
s = s + "<span class=\"text\">" + annotation.phon + "</span>";
}
if (annotatordetails && annotation.annotator) {
s = s + "<br/><span class=\"annotator\">" + annotation.annotator + " (" + annotation.annotatortype + ")</span>";
Expand Down

0 comments on commit 4f9e6a7

Please sign in to comment.