Commit 1d62df89 authored by dindigala's avatar dindigala
Browse files

refactor: wrap text elements to if condition

parent 289ad26a
Pipeline #203899 passed with stages
in 5 minutes and 56 seconds
......@@ -161,12 +161,14 @@ export default {
const id = this.stripAnnotationId(annotation.target.id);
const textElement = document.getElementById(id);
if (textElement !== null && contentTypes.includes(annotation.body['x-content-type'])) {
textElement.classList.add('annotation');
textElement.classList.add('annotation-disabled');
} else if (!contentTypes.includes(annotation.body['x-content-type'])) {
textElement.classList.remove('annotation');
textElement.classList.add('annotation-disabled');
if (textElement !== null) {
if (contentTypes.includes(annotation.body['x-content-type'])) {
textElement.classList.add('annotation');
textElement.classList.add('annotation-disabled');
} else {
textElement.classList.remove('annotation');
textElement.classList.add('annotation-disabled');
}
}
});
},
......
......@@ -57,7 +57,7 @@
}
],
"tabs":{
"Editorial": ["Person","Place", "Editorial Comment"],
"Editorial": ["Person", "Place", "Editorial Comment"],
"Motif": ["Motif"]
}
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment