Commit 59a95df2 authored by Frederik Arnold's avatar Frederik Arnold
Browse files

Merge branch 'release/v.1.2.1'

parents c1552fdd 5e3dfdc0
Pipeline #37837 passed with stage
in 11 seconds
......@@ -2,7 +2,8 @@
## Usage
Copy the output of Visualization.py in Project [Lotte](/../../../../lotte/) into a subfolder of `content`.
Copy the output of Visualization.py in project [Lotte](https://scm.cms.hu-berlin.de/schluesselstellen/lotte) into a subfolder of `content`. The files
and datastructures are documented in that project.
Then adjust the values in `config.json` to meet your needs, for example:
~~~
......
......@@ -92,12 +92,8 @@ class WorkScreen {
let targetText = this.repository.getTargetText(targetTextId);
this.repository.activeTargetText = targetText;
let targetLocation = this.repository.getTargetLocation(targetText.my_id, targetLocationId);
this.targetTextContainer.innerText = '';
let fileContent = await this.repository.loadTargetHtml(targetText.filename);
this.targetTextContainer.insertAdjacentHTML('afterbegin', fileContent);
await this.#displayTarget();
let selectedTargetElement = document.getElementById(targetLocation.my_id);
selectedTargetElement.classList.add('selected_target_location');
......@@ -124,9 +120,7 @@ class WorkScreen {
let targetTextId = parseInt(idParts[1]);
let targetText = this.repository.getTargetText(targetTextId);
this.repository.activeTargetText = targetText;
this.targetTextContainer.innerText = '';
let fileContent = await this.repository.loadTargetHtml(targetText.filename);
this.targetTextContainer.insertAdjacentHTML('afterbegin', fileContent);
await this.#displayTarget();
for (let matchElement of document.querySelectorAll('.target_location:not(.selected_target_location)')) {
matchElement.classList.add('target_location_highlight');
......@@ -550,6 +544,12 @@ class WorkScreen {
this.sourceTextContainer.insertAdjacentHTML('afterbegin', content);
}
async #displayTarget() {
this.targetTextContainer.innerText = '';
let fileContent = await this.repository.loadTargetHtml(this.repository.activeTargetText.filename);
this.targetTextContainer.insertAdjacentHTML('afterbegin', fileContent);
}
#prepareSegmentElements() {
for (let i = 0; i < this.segmentElements.length; i++) {
......
Supports Markdown
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